Compare commits
3 Commits
926df56972
...
graphql
| Author | SHA1 | Date | |
|---|---|---|---|
| 98f954aa82 | |||
| a0107eeb27 | |||
| 74d32d518e |
@@ -8,4 +8,5 @@ SERVER_HOST=localhost
|
||||
SERVER_PORT=3000
|
||||
BOT_ADMINS=[1]
|
||||
GROUP_IDS=-
|
||||
GRAPHQL_URL=http://localhost:3000/api/graphql
|
||||
GRAPHQL_URL=http://localhost:3000/api/graphql
|
||||
GRAPHQL_API_TOKEN="token-here"
|
||||
@@ -13,6 +13,7 @@ services:
|
||||
- SERVER_PORT=${SERVER_PORT}
|
||||
- BOT_ADMINS=${BOT_ADMINS}
|
||||
- GROUP_IDS=${GROUP_IDS}
|
||||
- GRAPHQL_URL=${GRAPHQL_URL}
|
||||
ports:
|
||||
- "3000:80"
|
||||
volumes:
|
||||
|
||||
@@ -14,5 +14,6 @@ services:
|
||||
- SERVER_PORT=${SERVER_PORT}
|
||||
- BOT_ADMINS=${BOT_ADMINS}
|
||||
- GROUP_IDS=${GROUP_IDS}
|
||||
- GRAPHQL_URL=${GRAPHQL_URL}
|
||||
build:
|
||||
context: .
|
||||
|
||||
@@ -14,5 +14,6 @@ services:
|
||||
- SERVER_PORT=${SERVER_PORT}
|
||||
- BOT_ADMINS=${BOT_ADMINS}
|
||||
- GROUP_IDS=${GROUP_IDS}
|
||||
- GRAPHQL_URL=${GRAPHQL_URL}
|
||||
build:
|
||||
context: .
|
||||
|
||||
@@ -2,9 +2,12 @@ import { Client, cacheExchange, fetchExchange } from "@urql/core";
|
||||
|
||||
const urql = new Client({
|
||||
url: process.env.GRAPHQL_URL || "",
|
||||
exchanges: [cacheExchange, fetchExchange]
|
||||
exchanges: [cacheExchange, fetchExchange],
|
||||
fetchOptions: {
|
||||
headers: {
|
||||
"x-api-key": process.env?.GRAPHQL_API_TOKEN || ""
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`GRAPHQL_URL`, process.env.GRAPHQL_URL);
|
||||
|
||||
export default urql;
|
||||
|
||||
Reference in New Issue
Block a user