apollo-server
apollo-server copied to clipboard
@defer / @stream support
This is the main feature request tracking issue for adding @defer / @stream support to Apollo Server. More details will be broken out shortly.
Hi @hwillson! I've been watching for @defer support to land for quite some time - over a year I'm sure. Excited to see that the team at least still has this on their radar - but curious if you can provide any updates or timeline.
The current architecture of how Apollo Server's core logic relates to the web frameworks it can be embedded in makes it challenging to add features such as @defer which change GraphQL execution from a single request/response to something more intricate. As part of Apollo Server 4 we will be improving this API to support features such as @defer. Whether we block 4.0.0 on ensuring that @defer works or just put the infrastructure in place to implement it in a follow-up minor release is tbd, so we're taking it out of the milestone for now.
Hi @glasser! Thanks for your response and transparency here. Your hard work on this project is greatly appreciated.
However, this response troubles me. I've been waiting for this functionality for a long time. The last time we heard updates from the Apollo team, the response was almost exactly the same, except referring to Apollo 3.0. The message was, "this will be much easier to implement once we have 3.0 released. We'll likely implement in a follow-up minor release after we finish the 3.0 release".
Is this actually something that's going to land in 4.0? Or are we going to hear the same story, except with 5.0?
EDIT: Here is an old 3.0 roadmap indicating plans to add @defer and @stream.
EDIT2: Comment by a contributor indicating that 3.0 solves the underlying issues preventing @defer.
EDIT3: Comment by a contributor indicating that @defer would land in 2021.
I'm not referencing these comments and notes to pile on or criticize. I'm just afraid that if work on these directives is not prioritized, that they will never make it into Apollo. These types of functionality can absolutely elevate GraphQL to another level. I love Apollo Server, Apollo Client, and Apollo Studio - but if another service offers support for @defer, @stream, @live, or other powerful directives, much of the community (myself included) will likely migrate away from Apollo.
I want the Apollo team to recognize how important this functionality is for our community. It needs to be prioritized.
EDIT4: I also understand that this is a large technical undertaking. Please know that there are community members that would be happy to help - through direct contributions, discussions around API/configuration, and testing POC or RC branches.
We basically split 3.0 into two pieces, which will be 3.0 and 4.0. Putting off everything that will come in 4.0 would have meant we didn't ship the original improvements of 3.0 last year. The 4.0 roadmap is similar to 3.0; 3.0 ended up being mostly focused on removing integrations with unmaintained projects and enabling folks to use the latest versions of dependencies rather than the full HTTP level rearchitecture we'd originally intended.
The comment you found from me last year said that the graphql-js implementation was close to done and it is in fact still not merged in graphql-js or part of the spec :)
Ah - thank you for clarifying. I did not know that the 3.0 release was split into two. That does make more sense.
... the
graphql-jsimplementation was close to done and it is in fact still not merged in graphql-js or part of the spec :)
Ah my apologies - I thought I had read that @defer had landed in graphql-js already. I must be thinking of something else. You're right though - the pr is still open. There's also a working group repo/discussion board for the working group putting @defer together for graphql-js. I'm going to follow over there for now.
Now being tracked in https://github.com/apollographql/apollo-server/issues/6671.