forked from subquery/cosmos-subql-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
38 lines (33 loc) · 917 Bytes
/
schema.graphql
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
# To improve query performance, we strongly suggest adding indexes to any field that you plan to filter or sort by
# Add the `@index` or `@index(unique: true)` annotation after any non-key field
# https://academy.subquery.network/build/graphql.html#indexing-by-non-primary-key-field
# type Block @entity {
# id: ID! # The block hash
# height: BigInt!
# }
# type Transaction @entity {
# id: ID!
# blockHeight: BigInt!
# timestamp: String!
# }
type Swap @entity {
id: ID!
sender: String!
txHash: String!
blockHeight: BigInt!
tokenInDenom: String
tokenInAmount: BigInt
tokenOutMin: BigInt!
swapRoutes: [SwapRoute] @derivedFrom(field: "swap") #This is virtual field
}
type SwapRoute @entity {
id: ID!
pool: Pool!
swap: Swap!
tokenInDenom: String
tokenOutDenom: String!
}
type Pool @entity {
id: ID!
swapRoutes: [SwapRoute] @derivedFrom(field: "pool") #This is virtual field
}