-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.graphqlrc.ts
35 lines (34 loc) · 1.04 KB
/
.graphqlrc.ts
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
import dotenv from 'dotenv';
dotenv.config();
export default {
projects: {
api: {
schema: ['./packages/reva-api/modules/generated-graphql-schema.graphql', `${process.env.NEXT_PUBLIC_WEBSITE_STRAPI_BASE_URL}/graphql`],
documents: ['./packages/reva-{api,candidate,admin-react}/src/**/*.{graphql,js,ts,jsx,tsx}'],
extensions: {
endpoints: {
default: {
url: `${process.env.BASE_URL}/api/graphql`,
headers: {
Authorization: `Bearer ${process.env.API_TOKEN}`,
},
},
},
},
},
website: {
schema: [`${process.env.NEXT_PUBLIC_WEBSITE_STRAPI_BASE_URL}/graphql`, './packages/reva-api/modules/generated-graphql-schema.graphql'],
documents: ['./packages/reva-website/src/**/*.{graphql,js,ts,jsx,tsx}'],
extensions: {
endpoints: {
local: {
url: 'http://127.0.0.1:1337/graphql',
},
prod: {
url: 'https://strapi.vae.gouv.fr/graphql',
}
},
},
},
},
};