-
Notifications
You must be signed in to change notification settings - Fork 7
/
graphql.config.js
49 lines (46 loc) · 1.19 KB
/
graphql.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const userHeaders = {
'x-hasura-role': 'user',
'x-hasura-default-role': 'user',
'x-hasura-admin-secret': 'password',
};
const adminHeaders = {
'x-hasura-role': 'admin',
'x-hasura-default-role': 'admin',
'x-hasura-admin-secret': 'password',
};
const gqlPath = 'libs/client/gql';
module.exports = {
projects: {
admin: {
schema: `${gqlPath}/admin/src/generated/schema.json`,
documents: `${gqlPath}/admin/src/queries/**/*.gql`,
extensions: {
endpoints: {
default: {
url: 'http://localhost:8080/v1/graphql',
headers: adminHeaders,
},
},
},
},
user: {
schema: `${gqlPath}/user/src/generated/schema.json`,
documents: `${gqlPath}/user/src/queries/**/*.gql`,
extensions: {
endpoints: {
default: {
url: 'http://localhost:8080/v1/graphql',
headers: userHeaders,
},
},
},
},
thegraph: {
schema: [
`${gqlPath}/thegraph/src/.graphclient/schema.graphql`,
`${gqlPath}/thegraph/src/.graphclient/sources/**/schema.graphql`,
],
documents: `${gqlPath}/thegraph/src/queries/**/*.gql`,
},
},
};