Skip to content

Commit 4a932e3

Browse files
committed
Use new GraphQL endpoint
1 parent 7d23f93 commit 4a932e3

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
REACT_APP_GRAPHQL_URL=https://graphql.juffalow.com/graphql
1+
REACT_APP_GRAPHQL_URL=https://graphql-api.juffalow.com/graphql
2+
REACT_APP_API_KEY=da2-dn7sjitqirdiff5g2jthgaln6a

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
- name: Install dependencies
4949
run: yarn
5050
- name: Build
51+
with:
52+
REACT_APP_GRAPHQL_URL: ${{ secrets.REACT_APP_GRAPHQL_URL }}
53+
REACT_APP_API_KEY: ${{ secrets.REACT_APP_API_KEY }}
5154
run: yarn build
5255
- name: Configure AWS credentials
5356
uses: aws-actions/configure-aws-credentials@v1

src/environment.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import { RequestParameters } from 'relay-runtime/lib/util/RelayConcreteNode';
88
import { Variables } from 'relay-runtime/lib/util/RelayRuntimeTypes';
99

1010
async function fetchGraphQL(params: RequestParameters, variables: Variables) {
11-
const response = await fetch(`https://graphql.juffalow.com/graphql`, {
11+
const response = await fetch(process.env.REACT_APP_GRAPHQL_URL as string, {
1212
method: 'POST',
1313
headers: {
1414
'Content-Type': 'application/json',
15+
'x-api-key': process.env.REACT_APP_API_KEY as string,
1516
},
1617
body: JSON.stringify({
1718
query: params.text,

0 commit comments

Comments
 (0)