Skip to content

Conversation

@tpham-mysten
Copy link
Contributor

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

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?

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:42am
sui-kiosk Ignored Ignored Dec 18, 2025 5:42am

Copy link
Contributor

@amnn amnn left a 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 !

return Ok(None);
};
let Some(contents) = self.start(ctx).await.map_err(upcast)? else {
return Ok(Connection::new(false, false));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should still be None -- we return an empty connection if we could paginate and we got no results. We return None when the contents of the value we are querying from (in this case the epoch) do not exist.

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