Skip to content

[graphql-alt] Add missing ZkLogin fields to match gRPC interface [4/n]#25696

Merged
tpham-mysten merged 2 commits intomainfrom
tpham-graphql-zklogin-full-fields
Mar 6, 2026
Merged

[graphql-alt] Add missing ZkLogin fields to match gRPC interface [4/n]#25696
tpham-mysten merged 2 commits intomainfrom
tpham-graphql-zklogin-full-fields

Conversation

@tpham-mysten
Copy link
Copy Markdown
Contributor

@tpham-mysten tpham-mysten commented Mar 4, 2026

Description

  • Add inputs, publicIdentifier, and jwkId fields to ZkLoginSignature to match the gRPC interface

Test plan

How did you test the new or updated feature?
cargo check -p sui-indexer-alt-graphql


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:
  • CLI:
  • Rust SDK:
  • Indexing Framework:

   Add missing ZkLogin fields to match gRPC interface [4/n]
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 4, 2026

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

Project Deployment Actions Updated (UTC)
sui-docs Ready Ready Preview, Comment Mar 5, 2026 6:42pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Preview Mar 5, 2026 6:42pm
sui-kiosk Ignored Ignored Preview Mar 5, 2026 6:42pm

Request Review

Copy link
Copy Markdown
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.

I wonder whether it's worth just exposing this information as a JSON payload... That is how they are typically interacted with, all the values are scalars, it's fairly compact, if you want one of the fields you're likely to want all of the fields, and it means we avoid having to introduce many specialised types into the schema.

I'm referring specifically to inputs and jwk_id in this case.

Approving to unblock regardless, but let me know what you think.

@tpham-mysten
Copy link
Copy Markdown
Contributor Author

tpham-mysten commented Mar 5, 2026

I agree inputs is complex and JSON would be simpler. If gRPC didn't already expose the same structured fields (ZkLoginInputs, ZkLoginProof, ZkLoginClaim, etc.), I would definitely go with JSON instead. But since it does, I'm leaning towards keeping it typed for consistency between the two interfaces.

Separately, my feeling is this field won't be commonly queried, mostly by advanced clients who would benefit from the full type safety and selective field querying that the structured approach provides. The logic is already implemented and not hard to maintain.

@tpham-mysten tpham-mysten force-pushed the tpham-graphql-zklogin-full-fields branch from 8e553bb to a04e502 Compare March 5, 2026 18:40
@tpham-mysten tpham-mysten temporarily deployed to sui-typescript-aws-kms-test-env March 5, 2026 18:40 — with GitHub Actions Inactive
@tpham-mysten tpham-mysten merged commit d89cc34 into main Mar 6, 2026
75 of 76 checks passed
@tpham-mysten tpham-mysten deleted the tpham-graphql-zklogin-full-fields branch March 6, 2026 03:06
@amnn
Copy link
Copy Markdown
Contributor

amnn commented Mar 6, 2026

I agree inputs is complex and JSON would be simpler. If gRPC didn't already expose the same structured fields (ZkLoginInputs, ZkLoginProof, ZkLoginClaim, etc.), I would definitely go with JSON instead. But since it does, I'm leaning towards keeping it typed for consistency between the two interfaces.

Separately, my feeling is this field won't be commonly queried, mostly by advanced clients who would benefit from the full type safety and selective field querying that the structured approach provides. The logic is already implemented and not hard to maintain.

Yeah, that's fair -- I don't have a strong feeling on it. My main reason to do this was to avoid making people fetch every field they cared about from these types, because it's likely they would want all of them (and that would also if these fields are nested inside pages, it would have a multiplicative effect on the output nodes).

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.

2 participants