Skip to content

Commit

Permalink
fix: fix playground issue + update readme for env vars for react app (#…
Browse files Browse the repository at this point in the history
…284)

Fix playground issue of featuers not opening in grahpiql
  • Loading branch information
roshaans authored Oct 13, 2023
1 parent 9ad5ac9 commit 3b67934
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,17 @@ yarn dev

- Prod App: `https://near.org/dataplatform.near/widget/QueryApi.App`


### ENV variables
The React app does not use the replacement files. Instead, we need to provide an `.env` file to make sure we are accessing the right enviornment

By default, the React app will use the `dev` enviornment vars
```
Prod:
NEXT_PUBLIC_HASURA_ENDPOINT=https://near-queryapi.api.pagoda.co
NEXT_PUBLIC_REGISTRY_CONTRACT_ID=queryapi.dataplatform.near
```
```
Dev:
NEXT_PUBLIC_HASURA_ENDPOINT=https://near-queryapi.dev.api.pagoda.co
NEXT_PUBLIC_REGISTRY_CONTRACT_ID=dev-queryapi.dataplatform.near
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"lint": "next lint"
},
"dependencies": {
"@graphiql/plugin-code-exporter": "0.3.0",
"@graphiql/plugin-explorer": "0.3.0",
"@graphiql/plugin-code-exporter": "0.3.5",
"@graphiql/plugin-explorer": "0.3.5",
"@monaco-editor/react": "^4.1.3",
"@near-lake/primitives": "0.1.0",
"@next/font": "13.1.6",
Expand All @@ -24,7 +24,7 @@
"buffer": "^6.0.3",
"eslint": "8.34.0",
"eslint-config-next": "13.1.6",
"graphiql": "^2.4.1",
"graphiql": "3.0.6",
"graphql": "^16.6.0",
"near-api-js": "1.1.0",
"near-social-bridge": "^1.4.1",
Expand Down

0 comments on commit 3b67934

Please sign in to comment.