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

Error with JSON #29

Open
JohnieXu opened this issue Apr 14, 2019 · 2 comments
Open

Error with JSON #29

JohnieXu opened this issue Apr 14, 2019 · 2 comments

Comments

@JohnieXu
Copy link

error like this

{ FetchError: invalid json response body at http://localhost:18000/graphiql reason: Unexpected end of JSON input
    at /Users/johniexu/.nvm/versions/node/v10.13.0/lib/node_modules/get-graphql-schema/node_modules/node-fetch/lib/index.js:241:32
    at process._tickCallback (internal/process/next_tick.js:68:7)
  message:
   'invalid json response body at http://localhost:18000/graphiql reason: Unexpected end of JSON input',
  type: 'invalid-json' }

graphiql server created by postgraphifle, when i run get-graphql-schema http://localhost:18000/graphiql > schema.graphql, I got error

@warcayac
Copy link

Same problem? Any answers?

@odigity
Copy link

odigity commented Mar 15, 2022

Would be nice if I could actually see the JSON that it's choking on. Would be nice if there was a debug or verbose flag for that.

BTW - In my case the error was caused by the CSRF protection in Django as explained here, but it would have been easier to determine the problem if I could see the HTML that get-graphql-schema was attempting to parse as JSON.

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