From d4f50eb70c71e5fa5d1756787daed8d066cd9068 Mon Sep 17 00:00:00 2001 From: "m.ray" <16125548+MadalinaRaicu@users.noreply.github.com> Date: Wed, 1 Nov 2023 21:21:36 +0200 Subject: [PATCH] fix(trading): pagination limit for candles (#5169) --- libs/candles-chart/src/lib/Candles.graphql | 6 +++++- libs/candles-chart/src/lib/__generated__/Candles.ts | 2 +- libs/markets/src/lib/__generated__/market-candles.ts | 2 +- libs/markets/src/lib/__generated__/markets-candles.ts | 2 +- libs/markets/src/lib/market-candles.graphql | 6 +++++- libs/markets/src/lib/markets-candles.graphql | 6 +++++- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/libs/candles-chart/src/lib/Candles.graphql b/libs/candles-chart/src/lib/Candles.graphql index 4279d6a98..b7eaa6d3f 100644 --- a/libs/candles-chart/src/lib/Candles.graphql +++ b/libs/candles-chart/src/lib/Candles.graphql @@ -20,7 +20,11 @@ query Candles($marketId: ID!, $interval: Interval!, $since: String!) { code } } - candlesConnection(interval: $interval, since: $since) { + candlesConnection( + interval: $interval + since: $since + pagination: { last: 5000 } + ) { edges { node { ...CandleFields diff --git a/libs/candles-chart/src/lib/__generated__/Candles.ts b/libs/candles-chart/src/lib/__generated__/Candles.ts index 720a57048..8ed71a02e 100644 --- a/libs/candles-chart/src/lib/__generated__/Candles.ts +++ b/libs/candles-chart/src/lib/__generated__/Candles.ts @@ -46,7 +46,7 @@ export const CandlesDocument = gql` code } } - candlesConnection(interval: $interval, since: $since) { + candlesConnection(interval: $interval, since: $since, pagination: {last: 5000}) { edges { node { ...CandleFields diff --git a/libs/markets/src/lib/__generated__/market-candles.ts b/libs/markets/src/lib/__generated__/market-candles.ts index 35341fe4e..cabc06a97 100644 --- a/libs/markets/src/lib/__generated__/market-candles.ts +++ b/libs/markets/src/lib/__generated__/market-candles.ts @@ -37,7 +37,7 @@ export const MarketCandlesDocument = gql` marketsConnection(id: $marketId) { edges { node { - candlesConnection(interval: $interval, since: $since) { + candlesConnection(interval: $interval, since: $since, pagination: {last: 1000}) { edges { node { ...MarketCandlesFields diff --git a/libs/markets/src/lib/__generated__/markets-candles.ts b/libs/markets/src/lib/__generated__/markets-candles.ts index 760207dff..1f4d773d5 100644 --- a/libs/markets/src/lib/__generated__/markets-candles.ts +++ b/libs/markets/src/lib/__generated__/markets-candles.ts @@ -19,7 +19,7 @@ export const MarketsCandlesDocument = gql` edges { node { id - candlesConnection(interval: $interval, since: $since) { + candlesConnection(interval: $interval, since: $since, pagination: {last: 1000}) { edges { node { ...MarketCandlesFields diff --git a/libs/markets/src/lib/market-candles.graphql b/libs/markets/src/lib/market-candles.graphql index 015f46d45..1ff1ec01e 100644 --- a/libs/markets/src/lib/market-candles.graphql +++ b/libs/markets/src/lib/market-candles.graphql @@ -11,7 +11,11 @@ query MarketCandles($interval: Interval!, $since: String!, $marketId: ID!) { marketsConnection(id: $marketId) { edges { node { - candlesConnection(interval: $interval, since: $since) { + candlesConnection( + interval: $interval + since: $since + pagination: { last: 1000 } + ) { edges { node { ...MarketCandlesFields diff --git a/libs/markets/src/lib/markets-candles.graphql b/libs/markets/src/lib/markets-candles.graphql index a95c1afbd..b66ee9d29 100644 --- a/libs/markets/src/lib/markets-candles.graphql +++ b/libs/markets/src/lib/markets-candles.graphql @@ -12,7 +12,11 @@ query MarketsCandles($interval: Interval!, $since: String!) { edges { node { id - candlesConnection(interval: $interval, since: $since) { + candlesConnection( + interval: $interval + since: $since + pagination: { last: 1000 } + ) { edges { node { ...MarketCandlesFields