-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Spec edits for incremental delivery, Section 3 only #1132
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
base: incremental-integration
Are you sure you want to change the base?
Spec edits for incremental delivery, Section 3 only #1132
Conversation
Updated to reflect spec draft graphql/graphql-spec#1132 Also changed the argument order to match the spec draft
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of nit-picky comments but I think we're pretty close! Do we have a glossary somewhere? I think we need to be really crisp on terms like "result", "response", "payload" and the like.
spec/Section 3 -- Type System.md
Outdated
responses: the initial response containing all non-deferred data, while | ||
subsequent responses include deferred data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we've refined the terminology around this: there's one response. The response for stream/defer is a stream consisting of an initial result payload followed by a number of incremental payloads. I couldn't find where we discussed this, so please correct as appropriate.
responses: the initial response containing all non-deferred data, while | |
subsequent responses include deferred data. | |
payloads: the initial payload containing all non-deferred data, while subsequent | |
payloads include deferred data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benjie after the last discussion we had, I decided to drop payload
. The response section now says:
The result of a GraphQL request must be either a single initial response or an
incremental stream. The response will be an incremental stream when the GraphQL
service has deferred or streamed data as a result of the@defer
or@stream
directives. When the result of the GraphQL operation is an incremental stream,
the first value will be an initial response, followed by one or more subsequent
responses.
spec/Section 3 -- Type System.md
Outdated
- `if: Boolean! = true` - When `true`, field _should_ be streamed (see related | ||
note below). When `false`, the field must not be streamed and all list items | ||
must be initially included. Defaults to `true` when omitted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "and" here implies this is an additional behaviour
- `if: Boolean! = true` - When `true`, field _should_ be streamed (see related | |
note below). When `false`, the field must not be streamed and all list items | |
must be initially included. Defaults to `true` when omitted. | |
- `if: Boolean! = true` - When `true`, field _should_ be streamed (see related | |
note below). When `false`, the field must behave as if the `@stream` directive | |
is not present—it must not be streamed and all of the list items must be | |
included. Defaults to `true` when omitted. |
d5322ae
to
32785b8
Compare
@benjie I added a rough glossary here: graphql/defer-stream-wg#106, I'll keep refining it as we go |
176172f
to
7c0ba73
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look correct to me, I don't think the definition of the @stream/@defer
directives have changed in a very long time, so this feels good.
cf072a4
to
47f362c
Compare
0640179
to
b3187e0
Compare
Co-authored-by: Benjie <benjie@jemjie.com>
Co-authored-by: Benoit 'BoD' Lubek <BoD@JRAF.org>
b3187e0
to
3b8799e
Compare
3b8799e
to
64dc38f
Compare
initialCount: Int! = 0 | ||
if: Boolean! = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep if
consistently as the first arg
|
||
#### @stream Arguments | ||
|
||
- `initialCount: Int! = 0` - The number of list items to include initially when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this arg be last? to match if/label/* order from defer
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
Glossary: graphql/defer-stream-wg#106
GraphQL Conf talk: https://www.youtube.com/watch?v=LEyDeNoobT0
Response types