-
Notifications
You must be signed in to change notification settings - Fork 11.6k
graphql-alt: ObjectKey.atCheckpoint fails on future time travel #22138
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 error handling in the GraphQL API to ensure that queries attempting to fetch data at a future checkpoint fail with an appropriate error message. Key changes include:
- Updated GraphQL schema and documentation comments to clarify the new behavior.
- Adjustments in the scope and object processing logic to return an error when a future checkpoint is provided.
- Corresponding updates in tests to verify the new error handling behavior.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
crates/sui-indexer-alt-graphql/staging.graphql | Updated doc comments on checkpoint usage. |
crates/sui-indexer-alt-graphql/src/snapshots/*.snap | Updated snapshots to verify the revised checkpoint error messages. |
crates/sui-indexer-alt-graphql/src/scope.rs | Modified function to return an Option based on checkpoint validity. |
crates/sui-indexer-alt-graphql/src/api/types/object.rs | Added error handling for future checkpoint values with a new error variant. |
crates/sui-indexer-alt-graphql/src/api/types/checkpoint.rs | Updated query() to return an error for future checkpoints. |
crates/sui-indexer-alt-graphql/src/api/query.rs | Updated comment to clarify new behavior. |
crates/sui-indexer-alt-graphql/schema.graphql | Synchronized documentation with the new error handling behavior. |
crates/sui-indexer-alt-e2e-tests/* | Updated tests to reflect the new error scenario for future checkpoints. |
928c063
to
0340e95
Compare
0340e95
to
00e120c
Compare
00e120c
to
4e311d0
Compare
Description
Based on our discussion on Wednesday, this change makes it so that the
atCheckpoint
filter will produce an error if you attempt to time travel into the future relative to the current latest checkpoint.Test plan
Updated E2E 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.