Skip to content

feat(incremental): merge deferred fragments at the same level - #3820

Closed
yaacovCR wants to merge 5 commits into
graphql:mainfrom
yaacovCR:try-merge
Closed

feat(incremental): merge deferred fragments at the same level#3820
yaacovCR wants to merge 5 commits into
graphql:mainfrom
yaacovCR:try-merge

Conversation

@yaacovCR

@yaacovCR yaacovCR commented Jan 8, 2023

Copy link
Copy Markdown
Contributor

depends on #3827

This PR attempts to implement the defer merging portion of the latest proposal:

Links:
graphql/defer-stream-wg#64
graphql/defer-stream-wg#52 (comment)

Corresponding spec edits are at: robrichard/graphql-spec#10

@netlify

netlify Bot commented Jan 8, 2023

Copy link
Copy Markdown

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit 8bbf2d8
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/63e0fa2f0988ac00086ac38a
😎 Deploy Preview https://deploy-preview-3820--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@yaacovCR
yaacovCR requested a review from robrichard January 8, 2023 14:16
@github-actions

github-actions Bot commented Jan 8, 2023

Copy link
Copy Markdown

Hi @yaacovCR, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@yaacovCR
yaacovCR force-pushed the try-merge branch 6 times, most recently from f1c30e9 to 4080c48 Compare January 10, 2023 15:15
@yaacovCR yaacovCR changed the title try aggressive defer merging feat(incremental): merge deferred fragments at the same level Jan 10, 2023
@yaacovCR
yaacovCR force-pushed the try-merge branch 5 times, most recently from 3da1cf0 to f15c6aa Compare January 12, 2023 12:09
Comment thread src/execution/collectFields.ts
Comment thread src/execution/collectFields.ts
@yaacovCR

yaacovCR commented Jan 14, 2023

Copy link
Copy Markdown
Contributor Author

this is ready for re-review, same basic approach, but:

  1. separated out a preparatory commit introducing the GroupedFieldSet and FieldSet types prior to the actual merging work
  2. added two follow-up commits following the merging work:
    • the first to change the key for deciding whether to branch from the stringified Path to the Path itself, which required memoizing Path objects for a given execution context so that they would be identical across all branches
    • the second to expose all the execution info to resolvers, including the FieldSet and deferDepth

@yaacovCR

Copy link
Copy Markdown
Contributor Author

closing this in favor of #3862

@yaacovCR yaacovCR closed this Mar 30, 2023
@yaacovCR
yaacovCR deleted the try-merge branch September 5, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants