Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 5 commits into from

Conversation

yaacovCR
Copy link
Contributor

@yaacovCR yaacovCR commented Jan 8, 2023

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
Copy link

netlify bot commented Jan 8, 2023

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.

@github-actions
Copy link

github-actions bot commented Jan 8, 2023

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
@yaacovCR
Copy link
Contributor Author

yaacovCR commented Jan 14, 2023

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
Contributor Author

closing this in favor of #3862

@yaacovCR yaacovCR closed this Mar 30, 2023
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.

None yet

2 participants