Update GQL schema types with arguments on plural fields (#7)
Part of [Support arguments on nested GQL query selections](https://www.notion.so/Support-arguments-on-nested-GQL-query-selections-6731b85910894a2bb7496ef7a44044cc) Queries like the following are supported now: ```gql query($userId: ID!) { user(id: $userId) { orderCount orders(orderBy: createdAt, orderDirection: desc) { id orderId inputAmount status createdAt } } } query($userId: ID!) { user(id: $userId) { transactions(orderBy: createdAt, orderDirection: desc) { id currency maturity side executionPrice futureValue amount averagePrice createdAt feeInFV user { id } } } } ``` Reviewed-on: #7 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
parent
ea4d3d6b1a
commit
f9a8227719
10
package.json
10
package.json
@ -39,11 +39,11 @@
|
|||||||
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
|
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.3.19",
|
"@apollo/client": "^3.3.19",
|
||||||
"@cerc-io/cli": "^0.2.104",
|
"@cerc-io/cli": "^0.2.105",
|
||||||
"@cerc-io/ipld-eth-client": "^0.2.104",
|
"@cerc-io/ipld-eth-client": "^0.2.105",
|
||||||
"@cerc-io/solidity-mapper": "^0.2.104",
|
"@cerc-io/solidity-mapper": "^0.2.105",
|
||||||
"@cerc-io/util": "^0.2.104",
|
"@cerc-io/util": "^0.2.105",
|
||||||
"@cerc-io/graph-node": "^0.2.104",
|
"@cerc-io/graph-node": "^0.2.105",
|
||||||
"@ethersproject/providers": "^5.4.4",
|
"@ethersproject/providers": "^5.4.4",
|
||||||
"debug": "^4.3.1",
|
"debug": "^4.3.1",
|
||||||
"decimal.js": "^10.3.1",
|
"decimal.js": "^10.3.1",
|
||||||
|
@ -1632,14 +1632,14 @@ type User {
|
|||||||
id: ID!
|
id: ID!
|
||||||
createdAt: BigInt!
|
createdAt: BigInt!
|
||||||
transactionCount: BigInt!
|
transactionCount: BigInt!
|
||||||
transactions: [Transaction!]!
|
transactions (orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]!
|
||||||
orderCount: BigInt!
|
orderCount: BigInt!
|
||||||
orders: [Order!]!
|
orders (orderBy: Order_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Order!]!
|
||||||
liquidationCount: BigInt!
|
liquidationCount: BigInt!
|
||||||
liquidations: [Liquidation!]!
|
liquidations (orderBy: Liquidation_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Liquidation!]!
|
||||||
transferCount: BigInt!
|
transferCount: BigInt!
|
||||||
transfers: [Transfer!]!
|
transfers (orderBy: Transfer_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transfer!]!
|
||||||
deposits: [Deposit!]!
|
deposits (orderBy: Deposit_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Deposit!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
type Order {
|
type Order {
|
||||||
@ -1657,7 +1657,7 @@ type Order {
|
|||||||
lendingMarket: LendingMarket!
|
lendingMarket: LendingMarket!
|
||||||
isPreOrder: Boolean!
|
isPreOrder: Boolean!
|
||||||
type: OrderType!
|
type: OrderType!
|
||||||
transactions: [Transaction!]!
|
transactions (orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]!
|
||||||
isCircuitBreakerTriggered: Boolean!
|
isCircuitBreakerTriggered: Boolean!
|
||||||
createdAt: BigInt!
|
createdAt: BigInt!
|
||||||
blockNumber: BigInt!
|
blockNumber: BigInt!
|
||||||
@ -1669,10 +1669,10 @@ type LendingMarket {
|
|||||||
currency: Bytes!
|
currency: Bytes!
|
||||||
maturity: BigInt!
|
maturity: BigInt!
|
||||||
isActive: Boolean!
|
isActive: Boolean!
|
||||||
transactions: [Transaction!]!
|
transactions (orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]!
|
||||||
orders: [Order!]!
|
orders (orderBy: Order_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Order!]!
|
||||||
volume: BigInt!
|
volume: BigInt!
|
||||||
dailyVolume: [DailyVolume!]!
|
dailyVolume (orderBy: DailyVolume_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [DailyVolume!]!
|
||||||
openingUnitPrice: BigInt!
|
openingUnitPrice: BigInt!
|
||||||
lastLendUnitPrice: BigInt!
|
lastLendUnitPrice: BigInt!
|
||||||
lastBorrowUnitPrice: BigInt!
|
lastBorrowUnitPrice: BigInt!
|
||||||
|
94
yarn.lock
94
yarn.lock
@ -194,10 +194,10 @@
|
|||||||
binaryen "101.0.0-nightly.20210723"
|
binaryen "101.0.0-nightly.20210723"
|
||||||
long "^4.0.0"
|
long "^4.0.0"
|
||||||
|
|
||||||
"@cerc-io/cache@^0.2.104":
|
"@cerc-io/cache@^0.2.105":
|
||||||
version "0.2.104"
|
version "0.2.105"
|
||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.104/cache-0.2.104.tgz#834c9201a7fc2185b2b2db0206c9e9c46e2897e3"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.105/cache-0.2.105.tgz#56cfdb5df6835443367343c5c14b9637b9155349"
|
||||||
integrity sha512-lJaEMNSO0AN+zU7AfAY/94sS9IiGK4puVlx6SeUv7O9boolUdYFJybpoE2E7XoJC9wC5199Yx7u8PWhWYB+EVw==
|
integrity sha512-tDODHDHoNlvpa0ukcaWqhOSgs16lc/ulhkM4DGVvrJzLOYQY7ErziHCsVRoFdVQ44sv3mXvyMDbENSdNdqNi+A==
|
||||||
dependencies:
|
dependencies:
|
||||||
canonical-json "^0.0.4"
|
canonical-json "^0.0.4"
|
||||||
debug "^4.3.1"
|
debug "^4.3.1"
|
||||||
@ -205,19 +205,19 @@
|
|||||||
fs-extra "^10.0.0"
|
fs-extra "^10.0.0"
|
||||||
level "^7.0.0"
|
level "^7.0.0"
|
||||||
|
|
||||||
"@cerc-io/cli@^0.2.104":
|
"@cerc-io/cli@^0.2.105":
|
||||||
version "0.2.104"
|
version "0.2.105"
|
||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.104/cli-0.2.104.tgz#646204fc8ffeeb1abb3c9f23877c6a9b5a092e5e"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.105/cli-0.2.105.tgz#a28b8daffa7f482ed997a89f45e62f1b7ea49eec"
|
||||||
integrity sha512-VsuSKnOdcRT6vaT4q8OrqdWyelqiPi8E5sH7L7OBgMkvi3a6ZpwW6fVX9zYK1Ql3fKIloHf9E2YTo5XcKFFlPw==
|
integrity sha512-Tb5Pcq9vdd4i37vrMcA3bIz0UalNEmouopC51IzrL2jK4b3tD0Qv1JdJoN5mB03iUf3zINKrCGqUQTN5CMZYaw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@apollo/client" "^3.7.1"
|
"@apollo/client" "^3.7.1"
|
||||||
"@cerc-io/cache" "^0.2.104"
|
"@cerc-io/cache" "^0.2.105"
|
||||||
"@cerc-io/ipld-eth-client" "^0.2.104"
|
"@cerc-io/ipld-eth-client" "^0.2.105"
|
||||||
"@cerc-io/libp2p" "^0.42.2-laconic-0.1.4"
|
"@cerc-io/libp2p" "^0.42.2-laconic-0.1.4"
|
||||||
"@cerc-io/nitro-node" "^0.1.15"
|
"@cerc-io/nitro-node" "^0.1.15"
|
||||||
"@cerc-io/peer" "^0.2.104"
|
"@cerc-io/peer" "^0.2.105"
|
||||||
"@cerc-io/rpc-eth-client" "^0.2.104"
|
"@cerc-io/rpc-eth-client" "^0.2.105"
|
||||||
"@cerc-io/util" "^0.2.104"
|
"@cerc-io/util" "^0.2.105"
|
||||||
"@ethersproject/providers" "^5.4.4"
|
"@ethersproject/providers" "^5.4.4"
|
||||||
"@graphql-tools/utils" "^9.1.1"
|
"@graphql-tools/utils" "^9.1.1"
|
||||||
"@ipld/dag-cbor" "^8.0.0"
|
"@ipld/dag-cbor" "^8.0.0"
|
||||||
@ -238,16 +238,16 @@
|
|||||||
typeorm "0.2.37"
|
typeorm "0.2.37"
|
||||||
yargs "^17.0.1"
|
yargs "^17.0.1"
|
||||||
|
|
||||||
"@cerc-io/graph-node@^0.2.104":
|
"@cerc-io/graph-node@^0.2.105":
|
||||||
version "0.2.104"
|
version "0.2.105"
|
||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.104/graph-node-0.2.104.tgz#89add23dee5ca6eb9fcf8592e42e6d297e3b523f"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.105/graph-node-0.2.105.tgz#c78afe9f2e43f1a0f21e99a1685a658912eef239"
|
||||||
integrity sha512-cLPPxM5H9vT393j/k2TZ9nF4ExAdWv77FhvF9eE3jFVj6hFIbYf3fKlKMBEIXRa9j6jZS2mtaoSTGJ8D2RYgXg==
|
integrity sha512-Am/09rCx6/BIO8G6KrLBiVhydlxi0MmrHoHrmaVrHTCdEKtmOWiRVWcSWq1PDJBdPyUp2ZuV8GJECMYDVatvrw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@apollo/client" "^3.3.19"
|
"@apollo/client" "^3.3.19"
|
||||||
"@cerc-io/assemblyscript" "0.19.10-watcher-ts-0.1.2"
|
"@cerc-io/assemblyscript" "0.19.10-watcher-ts-0.1.2"
|
||||||
"@cerc-io/cache" "^0.2.104"
|
"@cerc-io/cache" "^0.2.105"
|
||||||
"@cerc-io/ipld-eth-client" "^0.2.104"
|
"@cerc-io/ipld-eth-client" "^0.2.105"
|
||||||
"@cerc-io/util" "^0.2.104"
|
"@cerc-io/util" "^0.2.105"
|
||||||
"@types/json-diff" "^0.5.2"
|
"@types/json-diff" "^0.5.2"
|
||||||
"@types/yargs" "^17.0.0"
|
"@types/yargs" "^17.0.0"
|
||||||
bn.js "^4.11.9"
|
bn.js "^4.11.9"
|
||||||
@ -264,14 +264,14 @@
|
|||||||
typeorm-naming-strategies "^2.0.0"
|
typeorm-naming-strategies "^2.0.0"
|
||||||
yargs "^17.0.1"
|
yargs "^17.0.1"
|
||||||
|
|
||||||
"@cerc-io/ipld-eth-client@^0.2.104":
|
"@cerc-io/ipld-eth-client@^0.2.105":
|
||||||
version "0.2.104"
|
version "0.2.105"
|
||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.104/ipld-eth-client-0.2.104.tgz#ba3d6ca6aefb0f87564e44aeeb358e11f2d19353"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.105/ipld-eth-client-0.2.105.tgz#c4a42a9d4be823d1b52c79565a9dfeefff9a840b"
|
||||||
integrity sha512-LAi5ZHZi/H9H0oFWdhFztqS9BZ0uQPLg5xvCV3KcnleM7ulvNbhRllgHG6+wico9A2/q/1ySE3RIT3e4XTA22g==
|
integrity sha512-L61Bde4uGu0OepGjaLcMfavdQUEUCevV/eWhSfnJkV8CqXK4zo+kmL0IUKCmCYTuUMlX4IIHB0nypoIQs3j8aw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@apollo/client" "^3.7.1"
|
"@apollo/client" "^3.7.1"
|
||||||
"@cerc-io/cache" "^0.2.104"
|
"@cerc-io/cache" "^0.2.105"
|
||||||
"@cerc-io/util" "^0.2.104"
|
"@cerc-io/util" "^0.2.105"
|
||||||
cross-fetch "^3.1.4"
|
cross-fetch "^3.1.4"
|
||||||
debug "^4.3.1"
|
debug "^4.3.1"
|
||||||
ethers "^5.4.4"
|
ethers "^5.4.4"
|
||||||
@ -394,10 +394,10 @@
|
|||||||
lodash "^4.17.21"
|
lodash "^4.17.21"
|
||||||
uint8arrays "^4.0.3"
|
uint8arrays "^4.0.3"
|
||||||
|
|
||||||
"@cerc-io/peer@^0.2.104":
|
"@cerc-io/peer@^0.2.105":
|
||||||
version "0.2.104"
|
version "0.2.105"
|
||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.104/peer-0.2.104.tgz#f8757e42d4e730c183408f0e906e7008a04d0459"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.105/peer-0.2.105.tgz#add0eba37916ddf2b591d9a9c01ee8bf10128014"
|
||||||
integrity sha512-9ryGrstqpswq6fyy8pXGjcZdEhNNBMpHZJRzysPMbjYK2b1XG+VU9B8SiwLuaDbj65iHnePLVSJiw7GkOh7gKw==
|
integrity sha512-ffbaNJu52x/LO7D9SiXFKmirR57XDEHLPlq2Mbufi+IV/7CUmggdpQLk7kOw5p9j1Exmta/uD5EcdM42yZDphg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cerc-io/libp2p" "^0.42.2-laconic-0.1.4"
|
"@cerc-io/libp2p" "^0.42.2-laconic-0.1.4"
|
||||||
"@cerc-io/prometheus-metrics" "1.1.4"
|
"@cerc-io/prometheus-metrics" "1.1.4"
|
||||||
@ -466,23 +466,23 @@
|
|||||||
it-stream-types "^1.0.4"
|
it-stream-types "^1.0.4"
|
||||||
promjs "^0.4.2"
|
promjs "^0.4.2"
|
||||||
|
|
||||||
"@cerc-io/rpc-eth-client@^0.2.104":
|
"@cerc-io/rpc-eth-client@^0.2.105":
|
||||||
version "0.2.104"
|
version "0.2.105"
|
||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.104/rpc-eth-client-0.2.104.tgz#d0ac2497f8ce8471fc34498dcbea2bb796e73347"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.105/rpc-eth-client-0.2.105.tgz#5b2a08335c6b62c60efd660dec74708c82deebd0"
|
||||||
integrity sha512-BsNtikVhTi30aUTBYRLUHcY1hpeLBcQ2NE7Id6FNrVPKG1PhnHeSIQQHk3vJiFW9m1oh4LLndvg4ws8B8nNCDA==
|
integrity sha512-FsanKlIz9MglY3EJTBQZ4+zE5+cCezXvt3jCS0lZArRVkb8hFBnnDAYDZ5lC7+k7qUKABqb/Tw2xRhholL3lEw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cerc-io/cache" "^0.2.104"
|
"@cerc-io/cache" "^0.2.105"
|
||||||
"@cerc-io/ipld-eth-client" "^0.2.104"
|
"@cerc-io/ipld-eth-client" "^0.2.105"
|
||||||
"@cerc-io/util" "^0.2.104"
|
"@cerc-io/util" "^0.2.105"
|
||||||
chai "^4.3.4"
|
chai "^4.3.4"
|
||||||
ethers "^5.4.4"
|
ethers "^5.4.4"
|
||||||
left-pad "^1.3.0"
|
left-pad "^1.3.0"
|
||||||
mocha "^8.4.0"
|
mocha "^8.4.0"
|
||||||
|
|
||||||
"@cerc-io/solidity-mapper@^0.2.104":
|
"@cerc-io/solidity-mapper@^0.2.105":
|
||||||
version "0.2.104"
|
version "0.2.105"
|
||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.104/solidity-mapper-0.2.104.tgz#287a022ac2121b37cbce5809953bde65a7e12d07"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.105/solidity-mapper-0.2.105.tgz#c98b25cfd1020da32a67b9a4989bb6da0fa63505"
|
||||||
integrity sha512-VXm9dD78a3RT/FTLq1da84GEYTUnUU4maSZtNQspxX9jE88UEW2syg6Xq28shcl0Diu86iTUXzlT/E4lpEEvEA==
|
integrity sha512-f4i0fO1qf3qFpe8nJICHD5S5qRn6ZCVWEjuDdqsByB//jjJLy90yfWmRRR3OTaP9GoBjAomtW6hzKO2WM5H96Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
dotenv "^10.0.0"
|
dotenv "^10.0.0"
|
||||||
|
|
||||||
@ -491,15 +491,15 @@
|
|||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fts-channel/-/1.0.3-ts-nitro-0.1.1/ts-channel-1.0.3-ts-nitro-0.1.1.tgz#0768781313a167295c0bf21307f47e02dc17e936"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fts-channel/-/1.0.3-ts-nitro-0.1.1/ts-channel-1.0.3-ts-nitro-0.1.1.tgz#0768781313a167295c0bf21307f47e02dc17e936"
|
||||||
integrity sha512-2jFICUSyffuZ+8+qRhXuLSJq4GJ6Y02wxiXoubH0Kzv2lIKkJtWICY1ZQQhtXAvP0ncAQB85WJHqtqwH8l7J3Q==
|
integrity sha512-2jFICUSyffuZ+8+qRhXuLSJq4GJ6Y02wxiXoubH0Kzv2lIKkJtWICY1ZQQhtXAvP0ncAQB85WJHqtqwH8l7J3Q==
|
||||||
|
|
||||||
"@cerc-io/util@^0.2.104":
|
"@cerc-io/util@^0.2.105":
|
||||||
version "0.2.104"
|
version "0.2.105"
|
||||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.104/util-0.2.104.tgz#e8b6d2214182b9c20d2ad455bd7403efe347dd83"
|
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.105/util-0.2.105.tgz#14ae4d8f7d3bc077171bd09f5eeb4e848dce69c0"
|
||||||
integrity sha512-2uDbLQaYs9yg3/0SYFYEVNvEfeiU1FgH73FurQvoyy5woG11LI5bd77cpVPdrydbIrv3eE72k1D+FSKCY6QoVA==
|
integrity sha512-d/ZMMwli0T/s3EiEmN82E7QUpxWZLfdjLoqG9hBGRnVRlpWd/f+hZLqmsbckNrERhN7dXIwn5C+SanO7+mu8XQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@apollo/utils.keyvaluecache" "^1.0.1"
|
"@apollo/utils.keyvaluecache" "^1.0.1"
|
||||||
"@cerc-io/nitro-node" "^0.1.15"
|
"@cerc-io/nitro-node" "^0.1.15"
|
||||||
"@cerc-io/peer" "^0.2.104"
|
"@cerc-io/peer" "^0.2.105"
|
||||||
"@cerc-io/solidity-mapper" "^0.2.104"
|
"@cerc-io/solidity-mapper" "^0.2.105"
|
||||||
"@cerc-io/ts-channel" "1.0.3-ts-nitro-0.1.1"
|
"@cerc-io/ts-channel" "1.0.3-ts-nitro-0.1.1"
|
||||||
"@ethersproject/properties" "^5.7.0"
|
"@ethersproject/properties" "^5.7.0"
|
||||||
"@ethersproject/providers" "^5.4.4"
|
"@ethersproject/providers" "^5.4.4"
|
||||||
|
Loading…
Reference in New Issue
Block a user