-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pick(19817): graphql: port MovePackage queries to full_objects_history (
#19848) ## Description Spotted that MovePackage queries were still using `objects_history`, which is not going to work after that table gets pruned to two epochs. This PR replaces queries to `objects_history` with queries to `full_objects_history`, with support from `objects_version` and `packages` to fetch the checkpoint sequence number where necessary. ## Test plan Existing tests: ``` sui$ cargo nextest run -p sui-graphql-e2e-tests ``` And ran the following queries on the mainnet DB: ```graphql query AllPackages($after: String) { packages(first: 5 after: $after) { pageInfo { hasNextPage endCursor startCursor } nodes { address version } } } query AllPackagesBack($before: String) { packages(last: 5 before: $before) { pageInfo { hasNextPage endCursor startCursor } nodes { address version } } } query SystemPackages($after: String) { packageVersions(address: "0x2" first: 5 after: $after) { pageInfo { hasNextPage endCursor startCursor } nodes { address version } } } query SystemPackagesBack($before: String) { packageVersions(address: "0x2" last: 5 before: $before) { pageInfo { hasNextPage endCursor } nodes { address version } } } query UserPackage($after: String) { packageVersions( address: "0xbc3df36be17f27ac98e3c839b2589db8475fa07b20657b08e8891e3aaf5ee5f9" first: 5 after: $after ) { pageInfo { hasNextPage endCursor startCursor } nodes { address version } } } ``` --- ## 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. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
- Loading branch information
Showing
2 changed files
with
80 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters