apollo
apollo copied to clipboard
@defer support ?
Hi,
I am playing with the new directive @defer from apollo-server and I got this error:
{
"error": "Unexpected number in JSON at position 3"
}
So I would like to know if vue-apollo support this new directive or not ?
+1 @alexisgahon The same here. I am running a small demo of the apollo server alpha and the server works perfectlly with queries that do not contain the @defer.
Once a query containing the directive is sent to the server:
query { hello helloDeferred @defer{ text } }
The response is the same:
{ "error": "Unexpected number in JSON at position 3" }
Would love to have @defer support too! :-)
I'm not sure I have to do anything on vue-apollo side to support this.
Hi everyone,
Are there any updates regarding defer support for vue-apollo?
When it will be available? or if there are other options available? Thanks in advance
PS: Thank you Akryum for creating vue-apollo
@Akryum 👋 I was curious on your comment above:
I'm not sure I have to do anything on vue-apollo side to support this.
At Apollo we are currently working on implementing @defer support in our Web Client I wanted to check in to see if there was any questions we can answer to help this library leverage the use of @defer once we release it.
https://github.com/apollographql/apollo-client/issues/8184
👋 Just a follow up to my comment above: @defer is now supported in Apollo Web Client. You can see our docs for more information.
Is there anything we need to support this? Are the current observers enough?
@Akryum 👋 good question! I'll let @alessbell chime in here as she worked on the implementation.
Hi @Akryum 👋 As far as I can tell, there is no action needed on your side.
I spun up a quick demo in our E2E testing codebase running @vue/[email protected] and @apollo/[email protected] (since it was the fastest way for me to query a graph that supports @defer), and you can see that the multipart response is parsed and rendered correctly:

Apollo Client web 3.7 will be out of beta soon, but since there is no action needed here looks like this issue is good to close 👍