-
Notifications
You must be signed in to change notification settings - Fork 0
/
codegen.js
45 lines (43 loc) · 1.12 KB
/
codegen.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
const config = {
schema: [
{
// we force it to staging as that's how the team prefers as a development strategy
"https://api.tally.xyz/query": {
headers: {
"Api-Key": "a0a4cd00bb6953720c9c201c010cdd36a563e65c97e926a36a8acdfcd1d1eeb7",
},
},
},
],
documents: ["src/*.graphql"],
generates: {
"autogen/schema.ts": {
config: {
skipTypename: true,
errorType: "Error",
scalars: {
Long: "number",
Bytes: "string",
BigInt: "string",
Address: "string",
ChainID: "string",
Bytes32: "string",
Timestamp: "string",
AssetID: "string",
AccountID: "string",
},
fetcher: {
func: "../autogen/useGraphQLCodegen#useGraphQLCodegen",
isReactHook: true,
},
},
plugins: [
"typescript",
"typescript-operations",
"typescript-react-query",
],
},
},
}
// eslint-disable-next-line no-undef
module.exports = config