graphql-core-legacy icon indicating copy to clipboard operation
graphql-core-legacy copied to clipboard

Support for @defer directive

Open bholemt opened this issue 7 years ago • 7 comments

Implementation for @defer directive in graphene. Have tested it with Apollo Client alpha versions -

"apollo-boost": "0.2.0-alpha.14",
"graphql": "14.0.2",
"react-apollo": "2.2.0-alpha.3",
"react-scripts": "1.1.5"

Will also need corresponding changes in flask-graphql, sanic-graphql etc.

Existing test cases are working. However new test cases are not yet added.

bholemt avatar Nov 06 '18 04:11 bholemt

One test case failing on base master branch itself.

bholemt avatar Nov 06 '18 04:11 bholemt

Any update on this one?

janbaykara avatar Sep 25 '19 19:09 janbaykara

GraphQL-core is a port of GraphQL.js. As soon as @defer is part of the standard and included in GraphQL.js, it will be ported to GraphQL-core as well. We don't want to add and mix in more features than GraphQL.js supports because then it will become incompatible and very difficult to stay in sync with GraphQL.js. See also https://github.com/graphql/graphql-spec/issues/269

Cito avatar Sep 25 '19 19:09 Cito

Is there any update or progress on this, now that support for @defer and @stream directives are now part of GraphQL.js (as experimental branch)? https://github.com/graphql/graphql-js/pull/2319

flzozaya avatar Dec 01 '20 02:12 flzozaya

@flzozaya This will be eventually included in GraphQL-Core 3, but not in GraphQL-Core 2 (the legacy branch).

Cito avatar Dec 01 '20 07:12 Cito

@Cito would you know if defer support ended up being prioritized into GraphQL-Core 3?

arjunlol avatar Mar 16 '22 18:03 arjunlol

@arjunlol This is still only in an experimental branch in GraphQL.js, so it's not yet in GraphQL-core 3. We are also working on another mechanism to defer execution, see PR 155.

Cito avatar Mar 16 '22 19:03 Cito