-
Notifications
You must be signed in to change notification settings - Fork 1
/
.graphclientrc.yml
60 lines (54 loc) · 1.4 KB
/
.graphclientrc.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
sources:
- name: NFT
handler:
graphql:
endpoint: https://api.thegraph.com/subgraphs/name/amxx/nft-mainnet
transforms:
- prefix:
value: NFT_
includeRootOperations: true
ignore:
- _SubgraphErrorPolicy_
# Rename Account to User to apply Type Merging
- rename:
- from:
type: NFT_Account
to:
type: User
- typeMerging:
queryFields:
# Teach Type Merging how to resolve this
- queryFieldName: NFT_accounts
keyField: id
keyArg: "where.id_in"
- name: ENS
handler:
graphql:
endpoint: https://api.thegraph.com/subgraphs/name/ensdomains/ens
transforms:
- prefix:
value: ENS_
includeRootOperations: true
ignore:
- _SubgraphErrorPolicy_
# Rename Account to User to apply Type Merging
- rename:
- from:
type: ENS_Account
to:
type: User
- typeMerging:
queryFields:
# Without batching
- queryFieldName: ENS_accounts
keyField: id
keyArg: "where.id_in"
additionalTypeDefs: |
extend type Query {
"""Get a user by their ENS Name"""
findUserEns(name: String!): User
}
additionalResolvers:
- "./resolvers"
serve:
browser: false