-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcodegen.js
More file actions
32 lines (32 loc) · 721 Bytes
/
codegen.js
File metadata and controls
32 lines (32 loc) · 721 Bytes
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
module.exports = {
schema: [
{
[process.env.API_URL]: {
headers: {
'x-hasura-admin-secret': process.env.HASURA_GRAPHQL_ADMIN_SECRET,
},
},
},
],
documents: ['./src/services/api/requests/*.graphql'],
overwrite: true,
generates: {
'./src/services/api/requests.ts': {
plugins: [
'typescript',
'typescript-operations',
'typescript-react-apollo',
],
config: {
skipTypename: false,
withHooks: true,
withHOC: false,
withComponent: false,
apolloReactHooksImportFrom: '@apollo/client',
},
'./graphql.schema.json': {
plugins: ['introspection'],
},
},
},
};