apollo-feature-requests
apollo-feature-requests copied to clipboard
Add experimental support for @defer, @stream, and @live
Migrated from: apollographql/apollo-client#1152
Alpha support for @defer is now available on Apollo Server/Client! I'm linking the WIP spec here as a reference for authors of other GraphQL servers.
Whats about @stream? βΊοΈ
@ReggaePanda having a look at the implementation I would say that how @defer is used in this alpha version also covers @stream. So you could basically use @defer in lists is if it would be @stream.
@clarencenpy I would be interested in the plans on this alpha version of implementation and when it would find its way to the master branch.
Any update on this?
seems like this feature is "deferred" to after Apollo Client 3 is released
there's any work on this for the current Apollo client/server ?
has there ever been a solution for using @live in apollo?
What is the status of @defer and @stream support in Apollo Client and Server now that the spec is stage 2?
@Akryum Looks like it's planned for apollo client v3.5: https://github.com/apollographql/apollo-client/blob/main/ROADMAP.md#35
Also, a general tip: please make sure to wrap @defer and @stream in backticks like this: `@defer` `@stream`. Otherwise you end up unintentionally tagging github users.
π Hello everyone! Just a quick update on the support of @defer & @stream for the Apollo Client and Apollo Platform... The Client Team is a bit further ahead in development π then some of our other teams, so we are currently aligning our roadmaps to ensure Apollo can offer end to end support of @defer through the platform soon.
@stream support will likely come as a fast follow release for all of our teams, which we are also aligning on internally. The main goal for Apollo is to ensure we have end to end platform support for both of these important GraphQL features. Please let us know if you have questions!
Is it possible to use "@stream" in apollo client by now? I only got "@defer" working by implementing it like this: https://www.apollographql.com/docs/react/data/defer/
I got it working in the playground through the server though. (but showing null for the underlying objects which seems to be an issue with the playground?)
I am using React native and package https://www.npmjs.com/package/@apollo/client
@sgedda If i remember right it's possible by using some the experimental graphql version but it's very much unstable / you have to do some hacky things to make it work.
So no, Apollo currently doesn't support @stream right now.
I would recommend using https://formidable.com/open-source/urql/ and https://the-guild.dev/graphql/yoga-server if you really want a proper @stream support.
I personally moved my project from apollo to it since i really needed @stream & better performance
Hey all π
As an update here, we are working through how best to support @stream across the entire Apollo platform and figure out how best to roll this functionality out. We will have more to share in the coming days. Glad to see the interest for @stream!
@jerelmiller is there an update?
@jerelmiller Iβm also interested in an update on this!
Nope! I'll communicate an update when we have one π
is there a graphql client that supports streaming?
Streaming is useful e.g. for LLM responses, since they are very slow
@macrozone as per https://github.com/apollographql/apollo-feature-requests/issues/3#issuecomment-1830238231
You can currently use graphql-yoga as graphql server with urql as client, both supports @defer and @stream
https://formidable.com/open-source/urql/
https://the-guild.dev/graphql/yoga-server
@macrozone as per #3 (comment) You can currently use graphql-yoga as graphql server with urql as client, both supports
@deferand@streamhttps://formidable.com/open-source/urql/ https://the-guild.dev/graphql/yoga-server
yeah, I noticed that about graphql yoga, very cool!
Was not aware that urql supports @defer though, did
Hey @macrozone π
If you're looking for @defer only, Apollo Client currently supports this: https://www.apollographql.com/docs/react/data/directives#defer
We don't have support for @stream at the moment. @stream is still a bit of a moving target within the specification itself and the final output is still being hashed out. Feel free to use whatever suits you, just wanted you to be aware that @defer is currently supported π.