Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hasura/graphiql-online
Explore your GraphQL APIs with headers
https://github.com/hasura/graphiql-online
Last synced: about 1 month ago
JSON representation
Explore your GraphQL APIs with headers
- Host: GitHub
- URL: https://github.com/hasura/graphiql-online
- Owner: hasura
- License: mit
- Created: 2019-10-16T08:42:43.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T18:46:45.000Z (over 1 year ago)
- Last Synced: 2024-08-08T18:21:11.605Z (4 months ago)
- Language: JavaScript
- Homepage: https://graphiql-online.com/
- Size: 1.1 MB
- Stars: 91
- Watchers: 6
- Forks: 24
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - hasura/graphiql-online - Explore your GraphQL APIs with headers (others)
README
## GraphiQL Demo
This version of GraphiQL is a fork of the original version with a simple header management UI.
You can access it live here - https://graphiql-online.com
## Usage of Environment Variables
This app uses a few environment variables which are required for development. The production build uses values directly present in index.html serving this app.
We use [dotenv](https://github.com/motdotla/dotenv) for setting environment variables for development. Create a `.env` file in the root directory (wherever package.json is) and set the following values. Replace accordingly for testing.
```
PORT=3000
NODE_ENV=development
GRAPHQL_ENDPOINT=http://localhost:8090/v1/graphql
HEADER_STRING='{}'
VARIABLE_STRING='{}'
QUERY_STRING='query { test_table { id } }'
```**Note**
The .env file should not be in version control.## Deployment
```
$ npm run build
```The static assets will be generated in `static` folder. There is an index.html file referencing the css and js assets inside `dist` folder.
For a quick Docker based deployment, use `docker build -t graphiql .` && `docker run -d -p 8080:8080 graphiql` for running the production build locally.
You can also use now.sh for a cloud deployment. Just simply run `now` to deploy this and get a live URL.