Skip to content

Fix QUERY_ACCOUNT_WITH_TOKEN: token arg type is TokenId, not UInt64#5

Merged
dkijania merged 1 commit into
mainfrom
fix/account-with-token-query-type
May 27, 2026
Merged

Fix QUERY_ACCOUNT_WITH_TOKEN: token arg type is TokenId, not UInt64#5
dkijania merged 1 commit into
mainfrom
fix/account-with-token-query-type

Conversation

@dkijania

Copy link
Copy Markdown
Collaborator

Summary

The Mina daemon's account(token:) field has always expected a TokenId scalar, but the SDK declared \$token: UInt64!. Any call to client.getAccountWithToken() with a non-empty token would fail with:

Argument 'token' of type 'TokenId' expected on field 'account', found "..."

Confirmed against a local o1labs/mina-local-network:compatible-latest-lightnet daemon.

A follow-up PR (stacked on this branch) adds a two-layer drift-check script that would have caught this.

Test plan

  • Manual GraphQL request with the new query against lightnet succeeds.
  • Existing tests pass (no behavior change for the no-token branch which is what every example/test uses today).

🤖 Generated with Claude Code

The Mina daemon's `account(token:)` field has always expected a TokenId
scalar, but the SDK declared `$token: UInt64!`. Any call to
client.getAccountWithToken() with a non-empty token would fail with
"Argument 'token' of type 'TokenId' expected on field 'account'".

Confirmed against a local lightnet daemon (compatible-latest-lightnet
image). A follow-up PR adds a two-layer drift checker that would have
caught this earlier.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dkijania dkijania merged commit 51f4e51 into main May 27, 2026
6 checks passed
This was referenced May 27, 2026
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.

1 participant