Skip to content

[graphiql] Support the proposed "incremental: ..." response format #3470

@rmosolgo

Description

@rmosolgo

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions