diff --git a/crates/sui-graphql-rpc/schema/current_progress_schema.graphql b/crates/sui-graphql-rpc/schema/current_progress_schema.graphql index a90a9c4c215e7a..6cce95dd4f18a9 100644 --- a/crates/sui-graphql-rpc/schema/current_progress_schema.graphql +++ b/crates/sui-graphql-rpc/schema/current_progress_schema.graphql @@ -3133,7 +3133,7 @@ type Query { optionally bounding the versions exclusively from below with `afterVersion`, or from above with `beforeVersion`. """ - packageVersions(first: Int, after: String, last: Int, before: String, address: SuiAddress!, afterVersion: Int, beforeVersion: Int): MovePackageConnection! + packageVersions(first: Int, after: String, last: Int, before: String, address: SuiAddress!, afterVersion: UInt53, beforeVersion: UInt53): MovePackageConnection! """ Fetch the protocol config by protocol version (defaults to the latest protocol version known to the GraphQL service). diff --git a/crates/sui-graphql-rpc/src/types/query.rs b/crates/sui-graphql-rpc/src/types/query.rs index 632311c6b21faa..3ffc47d177704e 100644 --- a/crates/sui-graphql-rpc/src/types/query.rs +++ b/crates/sui-graphql-rpc/src/types/query.rs @@ -475,8 +475,8 @@ impl Query { last: Option, before: Option, address: SuiAddress, - after_version: Option, - before_version: Option, + after_version: Option, + before_version: Option, ) -> Result> { let Watermark { checkpoint, .. } = *ctx.data()?; @@ -485,8 +485,8 @@ impl Query { ctx.data_unchecked(), page, address, - after_version, - before_version, + after_version.map(|v| v.into()), + before_version.map(|v| v.into()), checkpoint, ) .await diff --git a/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap b/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap index 75c70fd00aa396..7ec4b44f1f92cd 100644 --- a/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap +++ b/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap @@ -3137,7 +3137,7 @@ type Query { optionally bounding the versions exclusively from below with `afterVersion`, or from above with `beforeVersion`. """ - packageVersions(first: Int, after: String, last: Int, before: String, address: SuiAddress!, afterVersion: Int, beforeVersion: Int): MovePackageConnection! + packageVersions(first: Int, after: String, last: Int, before: String, address: SuiAddress!, afterVersion: UInt53, beforeVersion: UInt53): MovePackageConnection! """ Fetch the protocol config by protocol version (defaults to the latest protocol version known to the GraphQL service).