-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: @defer
support
#2395
Comments
I spoke with @calvincestari around getting There's an ongoing stream of work related to supporting Once this work has merged, supporting
enum ApolloDeferredResponse<T> {
case loading
case result(Result<T, Error>)
} Such that this selection set is now wrapped within this property. I think this may well have some effects down the chain (e.g., is
Once the support for Footnotes |
Great summary, thanks @Iron-Ham! |
@calvincestari @Iron-Ham |
Nope, not yet. |
For some more context: version |
Does the team have an update on @defer support now that it is GA? Looking forward to being able to test in our iOS and Android apps. Thank you! |
Gotcha. I was referring to @defer being in GA on ApolloClient, but I guess in the case of the docs that is only for React and not iOS. Is there anything in the works for Kotlin? When there is an iOS preview we’d be interested in testing. Thank you |
I believe it's already available for Kotlin, it's just the iOS implementation that is lagging.
👍🏻 |
This is a late update but the RFC is up for review in #3093, and I've started implementation in the |
Any update on this for iOS? |
The first preview release was issued a couple weeks ago - https://github.com/apollographql/apollo-ios/releases/tag/preview-defer.1. We're still finishing it off. |
How do I disable defer experimental support? I'm on 1.14.0 and the json schema validation is breaking due to defer |
|
@loganblevins - take a look at your schema, how many defer directive definitions are there? If there is more than one it's correctly a validation error. |
Our schema line 1 has Why would code gen be creating the duplicate? |
🐛 link #3417 |
@loganblevins - I'll take a look at that issue, thanks. |
For context on this issue, I'm leaving it open until the Selection Set Initializer work is complete then we can consider |
@calvincestari Thanks for quick reply! Is there a way I can disable this experimental feature in meantime? I couldn't find that key for my config json |
One of the disadvantages of GraphQL’s request/response model is that the GraphQL response is not returned to clients until the entire request has finished processing. However, not all requested data may be of equal importance, and in some use cases it may be possible for applications to act on a subset of the requested data. An application can speed up its time-to-interactive if the GraphQL server can send the most important data as soon as it’s ready. The new
@defer
and@stream
directives allow GraphQL servers to do exactly that by returning multiple payloads from a single GraphQL response.Similar to
@stream
the@defer
directive also allows the client to receive data before the entire result is ready.@stream
can be used on list fields. Whereas@defer
can be used on used on fragment spreads and inline fragments.References
https://graphql.org/blog/2020-12-08-improving-latency-with-defer-and-stream-directives/
The text was updated successfully, but these errors were encountered: