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

Spec edits for incremental delivery, Section 3 only #1132

Open
wants to merge 1 commit into
base: incremental-integration
Choose a base branch
from

Conversation

robrichard
Copy link
Contributor

Extracted from the full PR (#1110) and targeting an integration branch to aid in review.

Helpful reference material:

Response format examples: graphql/defer-stream-wg#69
GraphQL Conf talk: https://www.youtube.com/watch?v=LEyDeNoobT0

highly recommended that GraphQL services honor the `@defer` and `@stream`
directives on each execution. However, the specification allows advanced use
cases where the service can determine that it is more performant to not defer
and/or stream. Therefore, GraphQL clients _must_ be able to process a response
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we discussed around this proposal that the @defer (and maybe @stream?) directives would have to be honored or not honored (with responses inlined) in the same fashion as applied to each item in a list. I think this would be important to mention, as this allows clients to cache their determinations as to whether the defer was inlined. This is relied on, for example, in graphql/graphql-js#4319 which introduces a transformer from the new format to the legacy version.1

Footnotes

  1. Note that the transformer functionality grew a bit unwieldy and will be probably be spun off if useful to a separate library outside graphql-js.

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