Skip to content
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

Add experimental support for @defer, @stream, and @live #3

Open
Akryum opened this issue Jul 27, 2018 · 19 comments
Open

Add experimental support for @defer, @stream, and @live #3

Akryum opened this issue Jul 27, 2018 · 19 comments
Labels
core Feature requests related to core functionality project-apollo-client (legacy) LEGACY TAG DO NOT USE

Comments

@Akryum
Copy link

Akryum commented Jul 27, 2018

Migrated from: apollographql/apollo-client#1152

@clarencenpy
Copy link

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.

@ManAnRuck
Copy link

Whats about @stream? ☺️

@lxwbr
Copy link

lxwbr commented Jan 2, 2019

@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.

@adamyi
Copy link

adamyi commented Aug 24, 2019

Any update on this?

@sebas5384
Copy link

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 ?

@boredland
Copy link

has there ever been a solution for using @live in apollo?

@Akryum
Copy link
Author

Akryum commented Jan 15, 2021

What is the status of @defer and @stream support in Apollo Client and Server now that the spec is stage 2?

@dylanwulf
Copy link

dylanwulf commented Jan 15, 2021

@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.

@jpvajda
Copy link
Contributor

jpvajda commented May 5, 2022

👋 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!

@sgedda
Copy link

sgedda commented Nov 28, 2023

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?)
image

I am using React native and package https://www.npmjs.com/package/@apollo/client

@Banou26
Copy link

Banou26 commented Nov 28, 2023

@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

@jerelmiller
Copy link
Member

jerelmiller commented Nov 29, 2023

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 jerelmiller added core Feature requests related to core functionality and removed project-apollo-server (legacy) LEGACY TAG DO NOT USE project-apollo-federation (legacy) LEGACY TAG DO NOT USE project-apollo-router (legacy) LEGACY TAG DO NOT USE labels Jan 22, 2024
@harisvsulaiman
Copy link

@jerelmiller is there an update?

@tasola
Copy link

tasola commented Mar 26, 2024

@jerelmiller I’m also interested in an update on this!

@jerelmiller
Copy link
Member

Nope! I'll communicate an update when we have one 🙂

@macrozone
Copy link

is there a graphql client that supports streaming?

Streaming is useful e.g. for LLM responses, since they are very slow

@Banou26
Copy link

Banou26 commented Apr 24, 2024

@macrozone as per #3 (comment)
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
Copy link

@macrozone as per #3 (comment) 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

yeah, I noticed that about graphql yoga, very cool!

Was not aware that urql supports @defer though, did

@jerelmiller
Copy link
Member

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 🙂.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Feature requests related to core functionality project-apollo-client (legacy) LEGACY TAG DO NOT USE
Projects
None yet
Development

No branches or pull requests