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
- Implement working prototype
- Support automatic/whitelisted persisted queries
- Select operation from a file that contains multiple queries/mutations
- Send multiplied operation in single request for array json/yaml data
- Load array data from csv with header
- Select default/environment endpoints from GraphQL Config, Prisma config extension, and Apollo config
- Use default paths for graphql files from extended GraphQL Config
- Cleanup code
- Rewrite to TypeScript
Install Prettier support for used editor/IDE.