-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[graphql-alt] Update Epoch return types for partial error support [4/n] #24683
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
Merged
tpham-mysten
merged 5 commits into
tpham-partial-error-transaction
from
tpham-partial-error-epoch-checkpoint
Dec 30, 2025
Merged
[graphql-alt] Update Epoch return types for partial error support [4/n] #24683
tpham-mysten
merged 5 commits into
tpham-partial-error-transaction
from
tpham-partial-error-epoch-checkpoint
Dec 30, 2025
Conversation
This file contains hidden or 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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Dec 18, 2025
amnn
approved these changes
Dec 18, 2025
Contributor
amnn
left a comment
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.
PTAL at the small comment/fixup about empty connection vs None, but otherwise looking good, thanks @tpham-mysten !
6f7a19c to
bdba809
Compare
17c38fb to
1283727
Compare
…t [5/n] (#24684) ## Description Add partial error support for GraphQL resolvers in sui-indexer-alt-graphql by changing return types from Result<Option<T>, E> to Option<Result<T, E>> for MoveModule and MovePackage types. ## Test plan How did you test the new or updated feature? ``` cargo nextest run -p sui-indexer-alt-e2e-tests ``` --- ## Stack: - #24595 - #24681 - #24682 - #24683 - #24684 ⬅️ ## 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): - [ ] gRPC: - [ ] JSON-RPC: - [x] GraphQL: Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally - [ ] CLI: - [ ] Rust SDK: - [ ] Indexing Framework:
…tenLabs/sui into tpham-partial-error-epoch-checkpoint
58010e5 to
267af15
Compare
6437e58
into
tpham-partial-error-transaction
48 of 52 checks passed
tpham-mysten
added a commit
that referenced
this pull request
Dec 30, 2025
…rt [3/n] (#24682) ## Description Add partial error support for GraphQL resolvers in sui-indexer-alt-graphql by changing return types from Result<Option<T>, E> to Option<Result<T, E>> for Transaction-related types. ## Test plan How did you test the new or updated feature? ``` cargo nextest run -p sui-indexer-alt-e2e-tests ``` --- # Stack: - #24595 - #24681 - #24682 ⬅️ - #24683 - #24684 ## 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): - [ ] gRPC: - [ ] JSON-RPC: - [x] GraphQL: Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally - [ ] CLI: - [ ] Rust SDK: - [ ] Indexing Framework:
tpham-mysten
added a commit
that referenced
this pull request
Dec 31, 2025
…ort [2/n] (#24681) ## Description Enable partial error support in sui-indexer-alt-graphql by changing GraphQL resolver return types from `Result<Option<T>, E>` to `Option<Result<T, E>>.` - Before: When a field returns an error, the entire parent object becomes null - After: When a field returns an error, only that specific field becomes null while sibling fields still return data Changes Pattern Migration Changed ~30 files to use the Option<Result<T, E>> pattern with two main approaches: 1. Async block with transpose: For complex async operations async fn field(&self) -> Option<Result<T, RpcError>> { async { ... Ok(Some(value)) }.await.transpose() } 2. Simple wrapping: For infallible cases async fn field(&self) -> Option<Result<T, RpcError>> { Some(Ok(value)) } Files Modified - Core types: object.rs, address.rs, move_type.rs, move_value.rs, dynamic_field.rs - Transaction types: transaction/mod.rs, transaction_effects.rs, gas_input.rs - Move types: move_module.rs, move_function.rs, move_datatype.rs, move_package.rs, move_object.rs - Epoch/Checkpoint: epoch.rs, checkpoint/mod.rs - Validator: validator.rs, validator_set.rs - Others: coin_metadata.rs, event/mod.rs, unchanged_consensus_object.rs, transaction_kind types ## Test plan How did you test the new or updated feature? ``` cargo nextest run -p sui-indexer-alt-e2e-tests ``` --- ## Stack - #24595 - #24681 - #24682 - #24683 - #24684 ## 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): - [ ] gRPC: - [ ] JSON-RPC: - [x] GraphQL: Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally - [ ] CLI: - [ ] Rust SDK: - [ ] Indexing Framework:
This was referenced Jan 26, 2026
tpham-mysten
added a commit
that referenced
this pull request
Jan 28, 2026
…port [6/n] (#25108) ## Description Updates ServiceConfig return types from Result<Option<T>, E> to Option<Result<T, E>> for partial error support. Files changed: - crates/sui-indexer-alt-graphql/src/api/types/service_config.rs ## Test plan ``` cargo nextest run -p sui-indexer-alt-e2e-tests ``` --- ## Stack - #24595 - #24681 - #24682 - #24683 - #24684 - #25108 ⬅️ ## 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): - [ ] gRPC: - [ ] JSON-RPC: - [x] GraphQL: Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally - [ ] CLI: - [ ] Rust SDK: - [ ] Indexing Framework:
tpham-mysten
added a commit
that referenced
this pull request
Jan 30, 2026
… return types for partial error support [7/n] (#25109) ## Description Updates `IMoveObject` interface and its implementors (`MoveObject`, `CoinMetadata`, `DynamicField`) return types from `Result<Option<T>, E>` to `Option<Result<T, E>>` for partial error support. Files changed: - crates/sui-indexer-alt-graphql/src/api/types/move_object.rs - crates/sui-indexer-alt-graphql/src/api/types/coin_metadata.rs - crates/sui-indexer-alt-graphql/src/api/types/dynamic_field.rs ## Test plan How did you test the new or updated feature? ``` cargo nextest run -p sui-indexer-alt-e2e-tests ``` --- ## Stack - #24595 - #24681 - #24682 - #24683 - #24684 - #25108 - #25109 ⬅️ ## 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): - [ ] gRPC: - [ ] JSON-RPC: - [x] GraphQL: Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally - [ ] CLI: - [ ] Rust SDK: - [ ] Indexing Framework:
tpham-mysten
added a commit
that referenced
this pull request
Jan 30, 2026
…n] (#25110) ## Description Updates `Query` return types from `Result<Option<T>, E>` to `Option<Result<T, E>>` for partial error support. Files changed: - crates/sui-indexer-alt-graphql/src/api/query.rs ## Test plan How did you test the new or updated feature? ``` cargo nextest run -p sui-indexer-alt-e2e-tests ``` --- - #24595 - #24681 - #24682 - #24683 - #24684 - #25108 - #25109 - #25110 ⬅️ ## 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): - [ ] gRPC: - [ ] JSON-RPC: - [x] GraphQL: Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally - [ ] CLI: - [ ] Rust SDK: - [ ] Indexing Framework:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add partial error support for GraphQL resolvers in sui-indexer-alt-graphql by changing return types from Result<Option, E> to Option<Result<T, E>> for Epoch, Checkpoint, and Validator types.
Test plan
How did you test the new or updated feature?
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.