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

@defer support ? #374

Open
alexisgahon opened this issue Aug 30, 2018 · 9 comments
Open

@defer support ? #374

alexisgahon opened this issue Aug 30, 2018 · 9 comments

Comments

@alexisgahon
Copy link

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 ?

@bogdanned
Copy link

bogdanned commented Sep 25, 2018

+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" }

@ronaldvdv
Copy link

Would love to have @defer support too! :-)

@Akryum
Copy link
Member

Akryum commented Sep 30, 2019

I'm not sure I have to do anything on vue-apollo side to support this.

@wolfiton
Copy link

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

@jpvajda
Copy link

jpvajda commented Aug 15, 2022

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

apollographql/apollo-client#8184

@jpvajda
Copy link

jpvajda commented Sep 17, 2022

👋 Just a follow up to my comment above: @defer is now supported in Apollo Web Client. You can see our docs for more information.

@Akryum
Copy link
Member

Akryum commented Sep 17, 2022

Is there anything we need to support this? Are the current observers enough?

@jpvajda
Copy link

jpvajda commented Sep 19, 2022

@Akryum 👋 good question! I'll let @alessbell chime in here as she worked on the implementation.

@alessbell
Copy link
Contributor

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/apollo-composable@4.0.0-alpha.19 and @apollo/client@3.7.0-beta.7 (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:

CleanShot 2022-09-19 at 15 09 37

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants