Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graphql-in-depth/graphcurl
GraphQL curl-like command-line client
https://github.com/graphql-in-depth/graphcurl
apollo apollo-client cli command command-line console csv csv-import curl graphql graphql-client graphql-import graphql-import-cli import json winston yaml
Last synced: 4 days ago
JSON representation
GraphQL curl-like command-line client
- Host: GitHub
- URL: https://github.com/graphql-in-depth/graphcurl
- Owner: graphql-in-depth
- License: mit
- Created: 2019-11-14T06:27:14.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T08:58:39.000Z (over 2 years ago)
- Last Synced: 2024-11-15T22:48:08.761Z (about 1 month ago)
- Topics: apollo, apollo-client, cli, command, command-line, console, csv, csv-import, curl, graphql, graphql-client, graphql-import, graphql-import-cli, import, json, winston, yaml
- Language: JavaScript
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graphcurl
GraphQL curl-like command-line client
[![Version](https://img.shields.io/npm/v/graphcurl.svg)](https://npmjs.org/package/graphcurl)
[![Downloads/week](https://img.shields.io/npm/dw/graphcurl.svg)](https://npmjs.org/package/graphcurl)
[![License](https://img.shields.io/npm/l/graphcurl.svg)](https://github.com/graphql-in-depth/graphcurl/blob/master/LICENSE)## Getting Started
### Install
You need [Node.js](https://nodejs.org/en/download/) and optionally [Yarn](https://yarnpkg.com/en/docs/install).
You can install `graphcurl`:
```
yarn global add graphcurl
# or: npm install -g graphcurl
```Or you can run it without installing:
```
npx graphcurl
```## Usage
```
Usage: gc|graphcurl [options]Options:
-V, --version output the version number
-e, --endpoint graphql endpoint
-k, --key output only selected key from response data
-o, --output write response data to json file instead of stdout
-q, --query graphql query (or mutation), may use #import
-d, --data query variables, file may be json or yaml (default: [])
-H, --header custom headers, file may be json or yaml (default: [])
-v, --verbose output more details
-D, --debug output debug data
-h, --help output usage information
```## Roadmap
- [x] 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](https://graphql-config.com), [Prisma config extension](https://github.com/prisma-labs/graphql-config-extension-prisma), and [Apollo config](https://www.apollographql.com/docs/references/apollo-config/)
- [ ] Use default paths for graphql files from extended GraphQL Config
- [ ] Cleanup code
- [ ] Rewrite to TypeScript## Development
### Code Style
Install [Prettier](https://github.com/prettier/prettier#editor-integration) support for used editor/IDE.