Skip to content

Commit 270c078

Browse files
committed
add env var for ONEGRAPH_APP_ID
1 parent 9cad4eb commit 270c078

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

gatsby-example-graphql/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ This is an example Gatsby site that uses [Mux](https://mux.com/) and Mux's Graph
66

77
This project was generated with `gatsby new` based on the [hello world example](https://github.com/gatsbyjs/gatsby-starter-hello-world).
88

9-
1. Copy `env.example` to `.env.development`. Add your Mux keys.
10-
2. `yarn dev` will start the gatsby server
11-
3. This app has a single index page with a list of your Mux assets
9+
To use this example you will need a free [OneGraph](https://www.onegraph.com) App and a free [Mux](https://mux.com/) account.
10+
11+
1. Copy `env.example` to `.env.development`. Add your Mux keys and onegraph APP ID
12+
1. `yarn dev` will start the gatsby server
13+
1. This app has a single index page with a list of your Mux assets

gatsby-example-graphql/env.example

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
MUX_TOKEN_ID=xxxx
22
MUX_TOKEN_SECRET=xxxx
3+
ONEGRAPH_APP_ID=xxxx

gatsby-example-graphql/gatsby-config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ module.exports = {
1919
// Field under which the remote schema will be accessible. You'll use this in your Gatsby query
2020
fieldName: "onegraph",
2121
// Url to query from - this is the onegraph Mux API
22-
url: "https://serve.onegraph.com/dynamic?app_id=0b33e830-7cde-4b90-ad7e-2a39c57c0e11",
23-
headers: {
24-
Authorization: `bearer ${process.env.ONEGRAPH_API_TOKEN}`,
25-
},
22+
url: `https://serve.onegraph.com/dynamic?app_id=${process.env.ONEGRAPH_APP_ID}`,
2623
},
2724
},
2825
],

0 commit comments

Comments
 (0)