From c55ceb14768c07b809d8ef586ee911f63cdb6828 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 5 Aug 2024 16:44:57 +0530 Subject: [PATCH] Regenerate GQL queries with args on plural fields --- src/gql/queries/lendingMarket.gql | 8 ++++---- src/gql/queries/lendingMarkets.gql | 10 +++++----- src/gql/queries/order.gql | 4 ++-- src/gql/queries/orders.gql | 6 +++--- src/gql/queries/user.gql | 12 ++++++------ src/gql/queries/users.gql | 14 +++++++------- src/schema.gql | 18 +++++++++--------- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/gql/queries/lendingMarket.gql b/src/gql/queries/lendingMarket.gql index 7f76d1e..4334bfa 100644 --- a/src/gql/queries/lendingMarket.gql +++ b/src/gql/queries/lendingMarket.gql @@ -1,10 +1,10 @@ -query lendingMarket($id: ID!, $block: Block_height){ +query lendingMarket($where: Transaction_filter, $orderBy: Transaction_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int, $where1: Order_filter, $orderBy1: Order_orderBy, $orderDirection1: OrderDirection, $first1: Int, $skip1: Int, $where2: DailyVolume_filter, $orderBy2: DailyVolume_orderBy, $orderDirection2: OrderDirection, $first2: Int, $skip2: Int, $id: ID!, $block: Block_height){ lendingMarket(id: $id, block: $block){ id currency maturity isActive - transactions{ + transactions(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ id currency maturity @@ -19,7 +19,7 @@ query lendingMarket($id: ID!, $block: Block_height){ blockNumber txHash } - orders{ + orders(where: $where1, orderBy: $orderBy1, orderDirection: $orderDirection1, first: $first1, skip: $skip1){ id orderId currency @@ -38,7 +38,7 @@ query lendingMarket($id: ID!, $block: Block_height){ txHash } volume - dailyVolume{ + dailyVolume(where: $where2, orderBy: $orderBy2, orderDirection: $orderDirection2, first: $first2, skip: $skip2){ id currency maturity diff --git a/src/gql/queries/lendingMarkets.gql b/src/gql/queries/lendingMarkets.gql index 934c652..da76de8 100644 --- a/src/gql/queries/lendingMarkets.gql +++ b/src/gql/queries/lendingMarkets.gql @@ -1,10 +1,10 @@ -query lendingMarkets($block: Block_height, $where: LendingMarket_filter, $orderBy: LendingMarket_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int){ - lendingMarkets(block: $block, where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ +query lendingMarkets($where: Transaction_filter, $orderBy: Transaction_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int, $where1: Order_filter, $orderBy1: Order_orderBy, $orderDirection1: OrderDirection, $first1: Int, $skip1: Int, $where2: DailyVolume_filter, $orderBy2: DailyVolume_orderBy, $orderDirection2: OrderDirection, $first2: Int, $skip2: Int, $block: Block_height, $where3: LendingMarket_filter, $orderBy3: LendingMarket_orderBy, $orderDirection3: OrderDirection, $first3: Int, $skip3: Int){ + lendingMarkets(block: $block, where: $where3, orderBy: $orderBy3, orderDirection: $orderDirection3, first: $first3, skip: $skip3){ id currency maturity isActive - transactions{ + transactions(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ id currency maturity @@ -19,7 +19,7 @@ query lendingMarkets($block: Block_height, $where: LendingMarket_filter, $orderB blockNumber txHash } - orders{ + orders(where: $where1, orderBy: $orderBy1, orderDirection: $orderDirection1, first: $first1, skip: $skip1){ id orderId currency @@ -38,7 +38,7 @@ query lendingMarkets($block: Block_height, $where: LendingMarket_filter, $orderB txHash } volume - dailyVolume{ + dailyVolume(where: $where2, orderBy: $orderBy2, orderDirection: $orderDirection2, first: $first2, skip: $skip2){ id currency maturity diff --git a/src/gql/queries/order.gql b/src/gql/queries/order.gql index 88986ed..56ffb09 100644 --- a/src/gql/queries/order.gql +++ b/src/gql/queries/order.gql @@ -1,4 +1,4 @@ -query order($id: ID!, $block: Block_height){ +query order($where: Transaction_filter, $orderBy: Transaction_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int, $id: ID!, $block: Block_height){ order(id: $id, block: $block){ id orderId @@ -31,7 +31,7 @@ query order($id: ID!, $block: Block_height){ } isPreOrder type - transactions{ + transactions(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ id currency maturity diff --git a/src/gql/queries/orders.gql b/src/gql/queries/orders.gql index b8a98e5..3a378af 100644 --- a/src/gql/queries/orders.gql +++ b/src/gql/queries/orders.gql @@ -1,5 +1,5 @@ -query orders($block: Block_height, $where: Order_filter, $orderBy: Order_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int){ - orders(block: $block, where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ +query orders($where: Transaction_filter, $orderBy: Transaction_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int, $block: Block_height, $where1: Order_filter, $orderBy1: Order_orderBy, $orderDirection1: OrderDirection, $first1: Int, $skip1: Int){ + orders(block: $block, where: $where1, orderBy: $orderBy1, orderDirection: $orderDirection1, first: $first1, skip: $skip1){ id orderId user{ @@ -31,7 +31,7 @@ query orders($block: Block_height, $where: Order_filter, $orderBy: Order_orderBy } isPreOrder type - transactions{ + transactions(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ id currency maturity diff --git a/src/gql/queries/user.gql b/src/gql/queries/user.gql index 0cc738b..8b33f00 100644 --- a/src/gql/queries/user.gql +++ b/src/gql/queries/user.gql @@ -1,9 +1,9 @@ -query user($id: ID!, $block: Block_height){ +query user($where: Transaction_filter, $orderBy: Transaction_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int, $where1: Order_filter, $orderBy1: Order_orderBy, $orderDirection1: OrderDirection, $first1: Int, $skip1: Int, $where2: Liquidation_filter, $orderBy2: Liquidation_orderBy, $orderDirection2: OrderDirection, $first2: Int, $skip2: Int, $where3: Transfer_filter, $orderBy3: Transfer_orderBy, $orderDirection3: OrderDirection, $first3: Int, $skip3: Int, $where4: Deposit_filter, $orderBy4: Deposit_orderBy, $orderDirection4: OrderDirection, $first4: Int, $skip4: Int, $id: ID!, $block: Block_height){ user(id: $id, block: $block){ id createdAt transactionCount - transactions{ + transactions(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ id currency maturity @@ -19,7 +19,7 @@ query user($id: ID!, $block: Block_height){ txHash } orderCount - orders{ + orders(where: $where1, orderBy: $orderBy1, orderDirection: $orderDirection1, first: $first1, skip: $skip1){ id orderId currency @@ -38,7 +38,7 @@ query user($id: ID!, $block: Block_height){ txHash } liquidationCount - liquidations{ + liquidations(where: $where2, orderBy: $orderBy2, orderDirection: $orderDirection2, first: $first2, skip: $skip2){ id collateralCurrency debtCurrency @@ -49,7 +49,7 @@ query user($id: ID!, $block: Block_height){ txHash } transferCount - transfers{ + transfers(where: $where3, orderBy: $orderBy3, orderDirection: $orderDirection3, first: $first3, skip: $skip3){ id currency amount @@ -58,7 +58,7 @@ query user($id: ID!, $block: Block_height){ blockNumber txHash } - deposits{ + deposits(where: $where4, orderBy: $orderBy4, orderDirection: $orderDirection4, first: $first4, skip: $skip4){ id currency amount diff --git a/src/gql/queries/users.gql b/src/gql/queries/users.gql index 2fc6577..3f2b637 100644 --- a/src/gql/queries/users.gql +++ b/src/gql/queries/users.gql @@ -1,9 +1,9 @@ -query users($block: Block_height, $where: User_filter, $orderBy: User_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int){ - users(block: $block, where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ +query users($where: Transaction_filter, $orderBy: Transaction_orderBy, $orderDirection: OrderDirection, $first: Int, $skip: Int, $where1: Order_filter, $orderBy1: Order_orderBy, $orderDirection1: OrderDirection, $first1: Int, $skip1: Int, $where2: Liquidation_filter, $orderBy2: Liquidation_orderBy, $orderDirection2: OrderDirection, $first2: Int, $skip2: Int, $where3: Transfer_filter, $orderBy3: Transfer_orderBy, $orderDirection3: OrderDirection, $first3: Int, $skip3: Int, $where4: Deposit_filter, $orderBy4: Deposit_orderBy, $orderDirection4: OrderDirection, $first4: Int, $skip4: Int, $block: Block_height, $where5: User_filter, $orderBy5: User_orderBy, $orderDirection5: OrderDirection, $first5: Int, $skip5: Int){ + users(block: $block, where: $where5, orderBy: $orderBy5, orderDirection: $orderDirection5, first: $first5, skip: $skip5){ id createdAt transactionCount - transactions{ + transactions(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first, skip: $skip){ id currency maturity @@ -19,7 +19,7 @@ query users($block: Block_height, $where: User_filter, $orderBy: User_orderBy, $ txHash } orderCount - orders{ + orders(where: $where1, orderBy: $orderBy1, orderDirection: $orderDirection1, first: $first1, skip: $skip1){ id orderId currency @@ -38,7 +38,7 @@ query users($block: Block_height, $where: User_filter, $orderBy: User_orderBy, $ txHash } liquidationCount - liquidations{ + liquidations(where: $where2, orderBy: $orderBy2, orderDirection: $orderDirection2, first: $first2, skip: $skip2){ id collateralCurrency debtCurrency @@ -49,7 +49,7 @@ query users($block: Block_height, $where: User_filter, $orderBy: User_orderBy, $ txHash } transferCount - transfers{ + transfers(where: $where3, orderBy: $orderBy3, orderDirection: $orderDirection3, first: $first3, skip: $skip3){ id currency amount @@ -58,7 +58,7 @@ query users($block: Block_height, $where: User_filter, $orderBy: User_orderBy, $ blockNumber txHash } - deposits{ + deposits(where: $where4, orderBy: $orderBy4, orderDirection: $orderDirection4, first: $first4, skip: $skip4){ id currency amount diff --git a/src/schema.gql b/src/schema.gql index 625800c..ffeeb4e 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -1632,14 +1632,14 @@ type User { id: ID! createdAt: BigInt! transactionCount: BigInt! - transactions (where: Transaction_filter, orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]! + transactions(where: Transaction_filter, orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]! orderCount: BigInt! - orders (where: Order_filter, orderBy: Order_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Order!]! + orders(where: Order_filter, orderBy: Order_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Order!]! liquidationCount: BigInt! - liquidations (where: Liquidation_filter, orderBy: Liquidation_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Liquidation!]! + liquidations(where: Liquidation_filter, orderBy: Liquidation_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Liquidation!]! transferCount: BigInt! - transfers (where: Transfer_filter, orderBy: Transfer_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transfer!]! - deposits (where: Deposit_filter, orderBy: Deposit_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Deposit!]! + transfers(where: Transfer_filter, orderBy: Transfer_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transfer!]! + deposits(where: Deposit_filter, orderBy: Deposit_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Deposit!]! } type Order { @@ -1657,7 +1657,7 @@ type Order { lendingMarket: LendingMarket! isPreOrder: Boolean! type: OrderType! - transactions (where: Transaction_filter, orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]! + transactions(where: Transaction_filter, orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]! isCircuitBreakerTriggered: Boolean! createdAt: BigInt! blockNumber: BigInt! @@ -1669,10 +1669,10 @@ type LendingMarket { currency: Bytes! maturity: BigInt! isActive: Boolean! - transactions (where: Transaction_filter, orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]! - orders (where: Order_filter, orderBy: Order_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Order!]! + transactions(where: Transaction_filter, orderBy: Transaction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Transaction!]! + orders(where: Order_filter, orderBy: Order_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Order!]! volume: BigInt! - dailyVolume (where: DailyVolume_filter, orderBy: DailyVolume_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [DailyVolume!]! + dailyVolume(where: DailyVolume_filter, orderBy: DailyVolume_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [DailyVolume!]! openingUnitPrice: BigInt! lastLendUnitPrice: BigInt! lastBorrowUnitPrice: BigInt!