Skip to content

Conversation

@tpham-mysten
Copy link
Contributor

@tpham-mysten tpham-mysten commented Dec 18, 2025

Description

Return Type Pattern Change:

  • Changed IAddressable interface field return types from Result<Option, RpcError> to Option<Result<T, RpcError>>
  • This enables async-graphql's partial error handling: when a field errors, the field becomes null and the error is recorded,
    but sibling fields still return data

Test plan

How did you test the new or updated feature?

cargo nextest run -p sui-indexer-alt-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.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • 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:

@vercel
Copy link

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Review Updated (UTC)
multisig-toolkit Ignored Ignored Dec 18, 2025 5:36am
sui-kiosk Ignored Ignored Dec 18, 2025 5:36am

before: Option<balance::Cursor>,
) -> Result<Option<Connection<String, Balance>>, RpcError<balance::Error>> {
let pagination: &PaginationConfig = ctx.data()?;
) -> Option<Result<Connection<String, Balance>, RpcError<balance::Error>>> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me wonder if it might be better to pull these functions out into a separate impl block that returns Result<Option<...>, ...> and then here we call that function and transpose the result.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or I wonder if you could use your async { ... } trick here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants