Skip to content

Commit

Permalink
fixup: package by checkpoint UInt53
Browse files Browse the repository at this point in the history
  • Loading branch information
amnn committed Aug 15, 2024
1 parent 1b34b9c commit 10222bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3121,7 +3121,7 @@ type Query {
This query will return all versions of a given user package that appear between the
specified checkpoints, but only records the latest versions of system packages.
"""
packages(first: Int, after: String, last: Int, before: String, afterCheckpoint: Int, beforeCheckpoint: Int): MovePackageConnection!
packages(first: Int, after: String, last: Int, before: String, afterCheckpoint: UInt53, beforeCheckpoint: UInt53): MovePackageConnection!
"""
Fetch the protocol config by protocol version (defaults to the latest protocol
version known to the GraphQL service).
Expand Down
8 changes: 4 additions & 4 deletions crates/sui-graphql-rpc/src/types/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,17 +447,17 @@ impl Query {
after: Option<move_package::Cursor>,
last: Option<u64>,
before: Option<move_package::Cursor>,
after_checkpoint: Option<u64>,
before_checkpoint: Option<u64>,
after_checkpoint: Option<UInt53>,
before_checkpoint: Option<UInt53>,
) -> Result<Connection<String, MovePackage>> {
let Watermark { checkpoint, .. } = *ctx.data()?;

let page = Page::from_params(ctx.data_unchecked(), first, after, last, before)?;
MovePackage::paginate_by_checkpoint(
ctx.data_unchecked(),
page,
after_checkpoint,
before_checkpoint,
after_checkpoint.map(|c| c.into()),
before_checkpoint.map(|c| c.into()),
checkpoint,
)
.await
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3125,7 +3125,7 @@ type Query {
This query will return all versions of a given user package that appear between the
specified checkpoints, but only records the latest versions of system packages.
"""
packages(first: Int, after: String, last: Int, before: String, afterCheckpoint: Int, beforeCheckpoint: Int): MovePackageConnection!
packages(first: Int, after: String, last: Int, before: String, afterCheckpoint: UInt53, beforeCheckpoint: UInt53): MovePackageConnection!
"""
Fetch the protocol config by protocol version (defaults to the latest protocol
version known to the GraphQL service).
Expand Down

0 comments on commit 10222bd

Please sign in to comment.