Skip to content

Commit

Permalink
[chore][GraphQL/Consistency] Update checkpoint_viewed_at comment
Browse files Browse the repository at this point in the history
## Description

To reflect the fact that `checkpoint_viewed_at` is no longer an
optional parameter.

## Test plan

:eyes:
  • Loading branch information
amnn committed May 14, 2024
1 parent 2822fad commit 408b7e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions crates/sui-graphql-rpc/src/types/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions crates/sui-graphql-rpc/src/types/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions crates/sui-graphql-rpc/src/types/transaction_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down

0 comments on commit 408b7e9

Please sign in to comment.