graphqurl icon indicating copy to clipboard operation
graphqurl copied to clipboard

Always returns with error "failed to fetch"

Open remino opened this issue 2 years ago • 1 comments

I'm trying graphqurl, and no matter what I do, all I get is failed to fetch. Works with cURL, however.

$ graphqurl --version
graphqurl/1.0.1 darwin-arm64 node-v18.14.1
$ gq http://localhost:4000/graphql -q '{ hello }'
Executing query... error
Error:  { errors: [ { message: 'failed to fetch' } ] }
$ curl -X POST -H 'content-type: application/json' -d '{ "query": "{ hello }" }' http://localhost:4000/graphql
{"data":{"hello":"world"}}

Looking at the log of the server, it looks like gq isn't even sending the GraphQL request to it. curl does.

remino avatar Oct 19 '23 02:10 remino

I am getting the same issue....

FickleLife avatar Nov 09 '23 07:11 FickleLife