Logo
GitHubDiscord

'@defer'ExperimentalRFC2

The @defer directive enables your queries to receive data for specific fields incrementally, instead of receiving all field data at the same time. This is helpful whenever some fields in a query take much longer to resolve than others.

There are several versions of the incremental protocol used by @defer. The latest protocol uses multipart/mixed;incrementalSpec=v0.2 as the Accept header. The previous one used multipart/mixed;deferSpec=20220824 as the Accept header. spec pr

More info: https://specs.apollo.dev/incremental/v0.2/#sec--@defer-

Projects

Project Name Supported Since Note
Apollo Client 4.1

Apollo Client supports @defer using both incremental v0.1 and incremental v0.2 since 4.0. The protocol needs explicit opt-it (blog post)

Apollo Kotlin 5.0.0-alpha.3

pr, doc

Apollo Router 1.8.0

Apollo Router only supports the incremental:0.1 spec (doc)

Apollo Server 5.1.0

@defer support requires graphql-js:17.0.0-alpha.9 (doc)

Apollo iOS 1.14.0

Apollo iOS only supports the incremental:0.1 spec (doc)

Domain Graph Service (DGS) Framework ?

Know the status of this feature? Let us know!

GraphQL Code Generator ?

Know the status of this feature? Let us know!

GraphQL Java ?

Know the status of this feature? Let us know!

GraphQL Kotlin ?

Know the status of this feature? Let us know!

GraphQL Yoga 3.0.0

Requires the defer and stream plugin. Read more.

GraphQL.js ?

Know the status of this feature? Let us know!

GraphiQL ?

Know the status of this feature? Let us know!

Grats N/A

@defer is provided by the server

Hive Gateway 1.0.0

Only supports the incremental:0.1 format. Read more.

Hot Chocolate 16.0.0

Hot Chocolate supports @defer using the incremental v0.2 protocol since 16.0.0 and using the older protocol since 13.0.0 (doc)

Relay 15.0.0

Relay does not support the latest version of the incremental protocol (issue)

Spring for GraphQL ?

Know the status of this feature? Let us know!

gql.tada 1.0.0

gql.tada is transport agnostic, but types deferred fragment spreads as optional. Related fixes shipped in 1.8.0 and 1.8.3.

urql 2.3.0

Experimental multipart incremental delivery support for @defer and @stream was added in 2.3.0 (pr). The protocol was later updated in 3.2.0 (pr) and 4.1.4 (pr).