From f480b7a5700c1c5e5c73de4e121688bb7e23238c Mon Sep 17 00:00:00 2001 From: Ashok Menon Date: Sun, 5 May 2024 02:36:19 +0100 Subject: [PATCH] [chore][GraphQL/Consistency] Update checkpoint_viewed_at comment ## Description To reflect the fact that `checkpoint_viewed_at` is no longer an optional parameter. ## Test plan :eyes: --- crates/sui-graphql-rpc/src/types/checkpoint.rs | 3 +-- crates/sui-graphql-rpc/src/types/event.rs | 3 +-- crates/sui-graphql-rpc/src/types/transaction_block.rs | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/sui-graphql-rpc/src/types/checkpoint.rs b/crates/sui-graphql-rpc/src/types/checkpoint.rs index a0e149471cb184..d4b093b5d8a99d 100644 --- a/crates/sui-graphql-rpc/src/types/checkpoint.rs +++ b/crates/sui-graphql-rpc/src/types/checkpoint.rs @@ -319,8 +319,7 @@ impl Checkpoint { }) .await?; - // Defer to the provided checkpoint_viewed_at, but if it is not provided, use the - // current available range. This sets a consistent upper bound for the nested queries. + // The "checkpoint viewed at" sets a consistent upper bound for the nested queries. let mut conn = Connection::new(prev, next); for stored in results { let cursor = stored.cursor(checkpoint_viewed_at).encode_cursor(); diff --git a/crates/sui-graphql-rpc/src/types/event.rs b/crates/sui-graphql-rpc/src/types/event.rs index ea09b2c5d062e8..16284f01618cd2 100644 --- a/crates/sui-graphql-rpc/src/types/event.rs +++ b/crates/sui-graphql-rpc/src/types/event.rs @@ -222,8 +222,7 @@ impl Event { let mut conn = Connection::new(prev, next); - // Defer to the provided checkpoint_viewed_at, but if it is not provided, use the - // current available range. This sets a consistent upper bound for the nested queries. + // The "checkpoint viewed at" sets a consistent upper bound for the nested queries. for stored in results { let cursor = stored.cursor(checkpoint_viewed_at).encode_cursor(); conn.edges.push(Edge::new( diff --git a/crates/sui-graphql-rpc/src/types/transaction_block.rs b/crates/sui-graphql-rpc/src/types/transaction_block.rs index 5843d88460cb5a..0241be6614081c 100644 --- a/crates/sui-graphql-rpc/src/types/transaction_block.rs +++ b/crates/sui-graphql-rpc/src/types/transaction_block.rs @@ -391,8 +391,7 @@ impl TransactionBlock { let mut conn = Connection::new(prev, next); - // Defer to the provided checkpoint_viewed_at, but if it is not provided, use the - // current available range. This sets a consistent upper bound for the nested queries. + // The "checkpoint viewed at" sets a consistent upper bound for the nested queries. for stored in results { let cursor = stored.cursor(checkpoint_viewed_at).encode_cursor(); let inner = TransactionBlockInner::try_from(stored)?;