-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodegen.yml
78 lines (73 loc) · 2.46 KB
/
codegen.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
schema:
- 'https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks'
- 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2'
- 'https://graph.aura.finance/subgraphs/name/aura/aura-mainnet-v2-1'
- 'https://backend-v3.beets-ftm-node.com/'
- 'https://api-v3.balancer.fi/'
documents:
- 'src/data/blocks/*.gql'
- 'src/data/balancer/*.gql'
- 'src/data/aura/*.gql'
- 'src/data/tokens/*gql'
hooks:
afterAllFileWrite:
- 'prettier --write'
generates:
# Generates a full copy of the remote schema
src/apollo/generated/schema.graphql:
plugins:
- schema-ast
# Generates fragment metadata needed by apollo cache
src/apollo/generated/fragmentMetadata.json:
plugins:
- fragment-matcher
# Generates query and mutation documents and types for ethereum-blocks and balancer-v2 subgraphs
src/apollo/generated/graphql-codegen-generated.ts:
schema:
- 'https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks'
- 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2'
documents:
- 'src/data/balancer/*.gql'
- 'src/data/blocks/*.gql'
plugins:
- add:
content: '/* tslint:disable */'
- typescript
- typescript-operations
- typescript-react-apollo
- fragment-matcher
config:
# Use interfaces where possible, instead of type aliases
declarationKind: 'interface'
# Generates query and mutation documents and types for aura subgraphs
src/apollo/generated/graphql-balancer-v3-codegen-generated.ts:
schema:
- 'https://backend-v3.beets-ftm-node.com/'
documents:
- 'src/data/balancer-api-v3/*.gql'
plugins:
- add:
content: '/* tslint:disable */'
- typescript
- typescript-operations
- typescript-react-apollo
- fragment-matcher
config:
# Use interfaces where possible, instead of type aliases
declarationKind: 'interface'
# Generates query and mutation documents and types for aura subgraphs
src/apollo/generated/graphql-aura-codegen-generated.ts:
schema:
- 'https://graph.aura.finance/subgraphs/name/aura/aura-mainnet-v2-1'
documents:
- 'src/data/aura/*.gql'
plugins:
- add:
content: '/* tslint:disable */'
- typescript
- typescript-operations
- typescript-react-apollo
- fragment-matcher
config:
# Use interfaces where possible, instead of type aliases
declarationKind: 'interface'