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

FetchError: invalid json response body at http://localhost:4000/graphql reason: Unexpected token < in JSON at position 0 #37

Open
romenigld opened this issue Mar 10, 2020 · 3 comments

Comments

@romenigld
Copy link

I'm trying a
$ get-graphql-schema http://localhost:4000/graphql > ./schema.graphql
And complain for this:

FetchError: invalid json response body at http://localhost:4000/graphql reason: Unexpected token < in JSON at position 0
    at /Users/romenigld/.asdf/installs/nodejs/12.13.1/.npm/lib/node_modules/get-graphql-schema/node_modules/node-fetch/lib/index.js:272:32
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  message: 'invalid json response body at http://localhost:4000/graphql reason: Unexpected token < in JSON at position 0',
  type: 'invalid-json'
}

@stefanwille
Copy link

I believe that you are getting an HTML response. Check the actual response body.

@jessielaf
Copy link

I have the same problem My response is in JSON
.

@odigity
Copy link

odigity commented Mar 15, 2022

See my comment here: #29 (comment)

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