Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
0c04b74 to
bb5766e
Compare
benjie
left a comment
There was a problem hiding this comment.
The term "payload" is used twice in the spec currently, each time to refer to the {data,errors} object that a subscription stream may yield on each event. This is consistent with our use of "response payload" here, so I approve 👍
| If an error was raised during execution that propagated to the operation root, | ||
| the `data` entry in the _response payload_ should be `null`. |
There was a problem hiding this comment.
Note to other reviewers: this line contains a subtle fix to the wording. 👍
bb5766e to
9aa2f0a
Compare
| :: A GraphQL request returns a _response payload_ when the GraphQL operation is | ||
| a query or mutation. When the GraphQL operation is a subscription, the GraphQL |
There was a problem hiding this comment.
This sentence is no longer accurate. A GraphQL query with incremental delivery no longer returns a response payload.
There was a problem hiding this comment.
Yes, this section will be updated in the Incremental Delivery spec draft: #1124. I'll update it once we have settled on the terms here.
|
Superseded by #1159 |
Follow up from #1135, Based on top of #1148
Alternative name
Response Map: #1143This creates a definition for Response Payload, defined as the map normally returned by GraphQL queries and mutations containing data and/or errors.
The definition of Response is updated to include both Response Payload, and Response Stream (for subscriptions).
I like using
Payloadas i think it extends naturally for incremental delivery. If this change is approved I plan to add two additional types,InitialResponsePayloadandSubsequentResponsePayloadas well asIncrementalStream, the stream of those types.Proposal for incremental delivery (roughly):
I went through every mention of response and most of the remaining usages are around response key or response field, referring to the object property name (ie for aliases and error paths). This could also likely be standardized in a follow up.See https://github.com/graphql/graphql-spec/pull/1147/files