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

GraphQL support broken (once again) #12

Closed
levrik opened this issue Oct 2, 2020 · 6 comments
Closed

GraphQL support broken (once again) #12

levrik opened this issue Oct 2, 2020 · 6 comments

Comments

@levrik
Copy link
Contributor

levrik commented Oct 2, 2020

Describe the bug

GraphQL requests work in general but I can't see the response from server. Neither if the request was successful or not (means contains errors or not).
Instead I'm just getting SyntaxError: Unexpected token in JSON at position 85. Check console for details..
With a different position depending on the actual JSON returned by server.
I think the unexpected token seems to be a space?
Sadly I can't check the response since this is routed through the extension. Some debug mode for the extension would be great, that it logs request/response pairs or similar. I can file another issue for this if it sounds good to you.

To Reproduce
Steps to reproduce the behavior:

  1. Go to GraphQL section
  2. Get the schema (works fine)
  3. Enter some query or mutation
  4. Send it and see this error described above.

Expected behavior
Returned JSON to be shown

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome
  • Version 85

Additional context

It's starting to get kinda "funny". Every time I'm using this application, something else is broken. Most of the time around GraphQL support, sometimes also just in general. I really like the look and feel of this application and it really makes me sad that every time I want to use some fundamental functionality is broken.

@liyasthomas
Copy link
Member

I just tried at my end. And it's working fine. Can you produce a screenshot of a errored query/mutations?

@levrik
Copy link
Contributor Author

levrik commented Oct 2, 2020

image

The query/mutation I'm entering doesn't matter. I'm always ending up with this.

@levrik
Copy link
Contributor Author

levrik commented Oct 2, 2020

I can even reproduce this error with "Get schema" when using https://rickandmortyapi.com/graphql as endpoint. Maybe this helps you reproducing it yourself?
For the example above, I've used our own GraphQL API. "Get schema" was working there but I'm hitting this issue on normal requests then.

@liyasthomas
Copy link
Member

Make sure you turned off Proxy mode and Extension mode from Settings.
Make sure you're using latest GraphQL query syntax.

  1. Visit https://hoppscotch.io/graphql
  2. Endpoint: https://rickandmortyapi.com/graphql
  3. Query:
query GetCharacter($id: ID!) {
  character(id: $id) {
    id
    name
  }
}
  1. Send

If this doesn't work, try cleaning site's cache. And try again.

@levrik
Copy link
Contributor Author

levrik commented Oct 2, 2020

@liyasthomas Yep. This is working fine so the problem is probably the extension.

@liyasthomas liyasthomas transferred this issue from hoppscotch/hoppscotch Oct 2, 2020
@AndrewBastin
Copy link
Member

Yup, this is known 😅 . I just couldn't get to the bottom of the issue yet, because it is a bit random.

Trying to work on a fix for that soon. I am busy working on the Teams system. Closing this issue as it is basically same underlying issue as #11

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

3 participants