graphql-engine/community/tools/graphiql-online
Rishichandra Wawhal d3f80265f5 update graphiql explorer in hasura console and graphiql online (closes #2313) (#2994)
* update graphiql explorer

* update onegraph explorer in graphiql online
2019-10-08 16:17:18 +05:30
..
bin community: explorer, voyager graphiql-online (close #2128,#2129) (#2737) 2019-08-20 11:30:42 +05:30
src update graphiql explorer in hasura console and graphiql online (closes #2313) (#2994) 2019-10-08 16:17:18 +05:30
static learn: update content, add algolia search (close #2308) (#2731) 2019-08-27 15:28:40 +05:30
webpack community: explorer, voyager graphiql-online (close #2128,#2129) (#2737) 2019-08-20 11:30:42 +05:30
.babelrc community: explorer, voyager graphiql-online (close #2128,#2129) (#2737) 2019-08-20 11:30:42 +05:30
.bootstraprc add online graphiql to community tools (#716) 2018-10-25 14:57:02 +05:30
.eslintignore add online graphiql to community tools (#716) 2018-10-25 14:57:02 +05:30
.eslintrc community: explorer, voyager graphiql-online (close #2128,#2129) (#2737) 2019-08-20 11:30:42 +05:30
.gitignore community: explorer, voyager graphiql-online (close #2128,#2129) (#2737) 2019-08-20 11:30:42 +05:30
appconfig.js add online graphiql to community tools (#716) 2018-10-25 14:57:02 +05:30
Dockerfile community: explorer, voyager graphiql-online (close #2128,#2129) (#2737) 2019-08-20 11:30:42 +05:30
now.json graphiql-online upgrade deployment to now 2.0 (close #1838) (#1858) 2019-03-27 13:56:04 +05:30
package-lock.json update graphiql explorer in hasura console and graphiql online (closes #2313) (#2994) 2019-10-08 16:17:18 +05:30
package.json update graphiql explorer in hasura console and graphiql online (closes #2313) (#2994) 2019-10-08 16:17:18 +05:30
README.md community: explorer, voyager graphiql-online (close #2128,#2129) (#2737) 2019-08-20 11:30:42 +05:30

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 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.