-
Notifications
You must be signed in to change notification settings - Fork 11.5k
graphql-alt: Query.packageVersions #22088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for package version pagination by introducing new GraphQL query fields (packageVersions, packageVersionsAfter, and packageVersionsBefore) and corresponding pagination logic in the MovePackage API. It also updates the underlying schema and reader to include a new cp_sequence_number field used for version filtering and checkpointing.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
crates/sui-indexer-alt-schema/src/packages.rs | Added cp_sequence_number field to StoredPackageOriginalId to enable checkpoint version filtering. |
crates/sui-indexer-alt-reader/src/packages.rs | Updated the package retrieval query to include cp_sequence_number. |
crates/sui-indexer-alt-graphql/staging.graphql, schema.graphql and snapshots | Extended GraphQL schema definitions with new pagination fields for package versioning. |
crates/sui-indexer-alt-graphql/src/api/types/object.rs & move_package.rs | Added and updated methods supporting package version pagination based on package version and cp_sequence_number. |
crates/sui-indexer-alt-graphql/src/api/query.rs | Introduced the package_versions query resolver invoking pagination by version. |
E2E tests | Added tests to verify the package version pagination behavior. |
Description
Add support for
Query.packageVersions
,MovePackage.packageVersionsBefore
, andMovePackage.packageVersionsAfter
,similar to the equivalent
Object
APIs, but using package versioning schemes (and only working for objects that are packages).Test plan
New E2E tests:
Update schema tests:
Stack
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.