Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oshosanya/graphql-export
graphql-export exports graphql queries to a format that can be imported into insomnia and postman api client
https://github.com/oshosanya/graphql-export
api graphql graphql-export graphql-queries hacktoberfest insomnia postman
Last synced: 6 days ago
JSON representation
graphql-export exports graphql queries to a format that can be imported into insomnia and postman api client
- Host: GitHub
- URL: https://github.com/oshosanya/graphql-export
- Owner: oshosanya
- Created: 2019-07-27T08:24:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T21:51:36.000Z (over 1 year ago)
- Last Synced: 2024-12-28T17:34:57.419Z (7 days ago)
- Topics: api, graphql, graphql-export, graphql-queries, hacktoberfest, insomnia, postman
- Language: TypeScript
- Homepage:
- Size: 307 KB
- Stars: 19
- Watchers: 2
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# graphql-export
This is a teeny tiny program that helps to export your graphql queries from the server to insomnia/postman graphql request collections
## Requirements
Yarn package managerNodeJS
## Quick Use
```
yarn global add graphql-export// For postman exports
graphql-export -u http://my-graph-ql-server-root -f postman//For insomnia exports
graphql-export -u http://my-graph-ql-server-root -f insomnia
```After running the command, an `export.json` file is generated which you can then import into insomnia or postman api client.
For insomnia, you might need to first create a folder and then import the file into it.
## Passing custom headers
You might need to pass headers to your graphql server, sometimes for authentication.
You can do that using the `-H` option.Example
`graphql-export -u http://my-graph-ql-server-root -f insomnia -H "x-hasura-secret: xxx-xxx-xxx"`
If you need to pass multiple headers, you can follow the below sample
`graphql-export -u http://my-graph-ql-server-root -f insomnia -H "header1: value1" "header2: value2"`