-
Notifications
You must be signed in to change notification settings - Fork 11.6k
graphql-alt: Epoch.systemPackages #22090
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 implements an API for fetching system packages used during an epoch by updating pagination types and cursor encoding across several GraphQL types. Key changes include:
- Replacing raw cursors (CVersion) with encoded cursor strings (via BcsCursor) in Connection types.
- Adding a new pagination function for system packages in MovePackage.
- Incorporating new workspace dependencies in Cargo.toml and updating related E2E tests.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
crates/sui-indexer-alt-graphql/src/api/types/object.rs | Updated connection types and cursor encoding for object version pagination. |
crates/sui-indexer-alt-graphql/src/api/types/move_package.rs | Updated connection types and added paginate_system_packages for system package retrieval. |
crates/sui-indexer-alt-graphql/src/api/types/epoch.rs | Added systemPackages field to the Epoch type. |
crates/sui-indexer-alt-graphql/src/api/scalars/cursor.rs | Introduced BcsCursor with BCS encoding for cursors. |
crates/sui-indexer-alt-graphql/src/api/query.rs | Adjusted connection types in query functions accordingly. |
Cargo.toml | Updated workspace dependencies. |
E2E tests | Added/updated snapshots and move tests for system packages. |
Comments suppressed due to low confidence (1)
crates/sui-indexer-alt-graphql/src/api/types/object.rs:78
- Replacing the raw cursor type with an encoded String in the Connection return type is a significant API change; please ensure this is properly documented for API consumers.
ty = "Result<Option<Connection<String, Object>>, RpcError<Error>>",
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.
all systems go
checkpoint as i64, | ||
pagination, | ||
if page.is_from_front() { | ||
query!("original_id") | ||
} else { | ||
query!("original_id DESC") | ||
}, | ||
page.limit() as i64 + 2, | ||
checkpoint as i64, | ||
); |
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.
this was a fun one to read
do we prefer the macro over method chain?
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.
I personally do, it makes it easier to keep track of bracketing etc.
Description
API for fetching the system packages that were used during a given epoch.
Test plan
New E2E basic tests:
...but transactional testing does not support system package upgrades, so this change was also tested manually against the production DB.
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.