Skip to content

Support @defer and @stream #734

Open
@Type1J

Description

@Type1J

Is your feature request related to a problem? Please describe.
I'd like to issue 1 request and get back important data, but then have the less important data sent later, or have some parts streamed as they change (like a "like" count).

Describe the solution you'd like
The GraphQL spec is being updated to describe 2 directives: @defer and @stream that were made exactly to solve the problem as described above: graphql/graphql-spec#742 This is different from subscriptions, and it can use http 1.1 chunked encoding without websockets to accomplish this goal as described here: https://youtu.be/icv_Pq06aOY?t=788

Describe alternatives you've considered
Subscriptions are an alternative, however, that requires a second request.

Additional context
These ideas have been around for a long time: https://www.apollographql.com/blog/new-features-in-graphql-batch-defer-stream-live-and-subscribe-7585d0c28b07/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions