GraphQL curl-like command-line client
You need Node.js and optionally Yarn.
You can install graphcurl
:
yarn global add graphcurl
# or: npm install -g graphcurl
Or you can run it without installing:
npx graphcurl
Usage: gc|graphcurl [options]
Options:
-V, --version output the version number
-e, --endpoint <url> graphql endpoint
-k, --key <key> output only selected key from response data
-o, --output <file> write response data to json file instead of stdout
-q, --query <query|@file|-> graphql query (or mutation), may use #import
-d, --data <variable:value|@file|-> query variables, file may be json or yaml (default: [])
-H, --header <header:value|@file|-> custom headers, file may be json or yaml (default: [])
-v, --verbose output more details
-D, --debug output debug data
-h, --help output usage information
Install Prettier support for used editor/IDE.