Skip to content

Always returns with error "failed to fetch" #141

@remino

Description

@remino

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions