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

Query execution hangs after a failed query #260

Closed
miel-dev0 opened this issue Apr 13, 2018 · 5 comments
Closed

Query execution hangs after a failed query #260

miel-dev0 opened this issue Apr 13, 2018 · 5 comments

Comments

@miel-dev0
Copy link
Contributor

Hello. Thank you for the exellent library.

One of components I'm currently building takes a user-inputted string as prop and use it as a query variable.

The GraphQL endpoint responds with an error if passed string is too short, or otherwise considered invalid (such as SQL injection).

If a GraphQL or network error occurs, the error itself is propagated correctly, but subsequent query hangs - $apolloData.loading is set to 1 and $apolloData.queries.[...].loading is set to true, without any actual request to the server being made.

searchAddress: {
  query: addressSearch,
  variables(): AddressSearchQueryVariables {
     return {
        keyword: this.keyword
     };
   }
}
@marcovc
Copy link

marcovc commented Apr 17, 2018

I have this problem also. Did you find any workaround? Thanks

@miel-dev0
Copy link
Contributor Author

Unfortunately, No, I am forced to fall back to 2.1.0 at the moment. It seems this bug was introduced in version 3.

@marcovc
Copy link

marcovc commented Apr 17, 2018

Thanks for your reply. Interestingly, I just downgraded vue-apollo to version 2.1.0-rc.5 and the bug is still there. Must be in one of its dependencies...

@chatondearu
Copy link

chatondearu commented Apr 24, 2018

Hi, I found some same issue in react-apollo issues and I have the same problem, I think the problem came with apollo-client a PR was here and can solve the problem but not the solution.

@Akryum what do you think ?

@Akryum
Copy link
Member

Akryum commented May 11, 2018

I think this is an upstream issue in apollo client as you pointed out.

@Akryum Akryum closed this as completed May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants