Skip to content

allow nested defers at the same level#4002

Merged
yaacovCR merged 1 commit into
graphql:mainfrom
yaacovCR:allow-nested
Mar 20, 2024
Merged

allow nested defers at the same level#4002
yaacovCR merged 1 commit into
graphql:mainfrom
yaacovCR:allow-nested

Conversation

@yaacovCR

Copy link
Copy Markdown
Contributor

Implements Option A from graphql/defer-stream-wg#80

@yaacovCR yaacovCR added the PR: feature 🚀 requires increase of "minor" version number label Dec 22, 2023
@netlify

netlify Bot commented Dec 22, 2023

Copy link
Copy Markdown

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit bf20902
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/65f9f289d20bb5000870dfe8
😎 Deploy Preview https://deploy-preview-4002--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 configuration.

@github-actions

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

This comment has been minimized.

@github-actions

github-actions Bot commented Feb 1, 2024

Copy link
Copy Markdown

@github-actions publish-pr-on-npm

@yaacovCR The latest changes of this PR are available on NPM as
graphql@17.0.0-alpha.3.canary.pr.4002.b3f6af2e83280d7830b2a01265e0977b7b68e2f4
Note: no gurantees provided so please use your own discretion.

Also you can depend on latest version built from this PR:
npm install --save graphql@canary-pr-4002

@yaacovCR

Copy link
Copy Markdown
Contributor Author

This is the starting point for #4026, a major rewrite of incremental delivery with the aim of following the spec edits at graphql/graphql-spec#1077

Considering that, if we are confident #4026 will get merged, this PR becomes important less for the implementation, and more for the test changes.

Comment thread src/execution/__tests__/defer-test.ts Outdated
if we allow nesting of defers at the same level then we have to handle the case where a defer is completely empty -- not just empty because its fields are also contained within a parent.

this means that collectFields must directly return the new defer usages so that even empty defer usages can be used to create fragments so that we can track their children
@yaacovCR yaacovCR merged commit 51f41eb into graphql:main Mar 20, 2024
@yaacovCR yaacovCR deleted the allow-nested branch March 20, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature 🚀 requires increase of "minor" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants