Hi! I'm trying to use GraphiQL with @defer. I found that it has some support built in via enableIncrementalDelivery, which defaults to true.
However, there's a long-running proposal to change the standard response structure: graphql/graphql-spec#742 .In that proposal, each patch would include a { incremental: [ ... ] } array which includes { data: ... , path: ... } entries.
Although it's only a proposal, it was implemented in GraphQL-JS about a year ago (graphql/graphql-js#3659) and has also been added to urql and apollo client
It looks like GraphiQL expects data and path to be top-level keys in the server's response:
|
// We pull out errors here, so we dont include it later |
|
const { path, data, errors, ...rest } = part; |
What do you think about also checking for incremental: ... entries there, to support this new response format?
Thanks!
Hi! I'm trying to use GraphiQL with
@defer. I found that it has some support built in viaenableIncrementalDelivery, which defaults totrue.However, there's a long-running proposal to change the standard response structure: graphql/graphql-spec#742 .In that proposal, each patch would include a
{ incremental: [ ... ] }array which includes{ data: ... , path: ... }entries.Although it's only a proposal, it was implemented in GraphQL-JS about a year ago (graphql/graphql-js#3659) and has also been added to urql and apollo client
It looks like GraphiQL expects
dataandpathto be top-level keys in the server's response:graphiql/packages/graphiql-react/src/execution.tsx
Lines 218 to 219 in 7daa163
What do you think about also checking for
incremental: ...entries there, to support this new response format?Thanks!