Skip to content
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

[graphql] BigInt variables cause runtime fatal when passed to isFinite() #1986

Closed
steveluscher opened this issue Dec 21, 2023 · 4 comments · Fixed by #2022
Closed

[graphql] BigInt variables cause runtime fatal when passed to isFinite() #1986

steveluscher opened this issue Dec 21, 2023 · 4 comments · Fixed by #2022
Assignees
Labels
bug Something isn't working released

Comments

@steveluscher
Copy link
Collaborator

This query:

query GetTransactionsInBlock($block: BigInt!) {
  block(slot: $block) {
    blockhash
    blockHeight
    blockTime
    parentSlot
    previousBlockhash
  }
}

Generates this error

{
  "errors": [
    {
      "message": "Cannot convert a BigInt value to a number",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "block"
      ]
    }
  ],
  "data": {
    "block": null
  }
}

Repro link.

@steveluscher steveluscher added the bug Something isn't working label Dec 21, 2023
@buffalojoec
Copy link
Contributor

Is this just through the playground or the resolver itself?

@steveluscher
Copy link
Collaborator Author

I think it's the resolver.

buffalojoec added a commit that referenced this issue Jan 9, 2024
…rt for cache keys

This PR swaps `fast-stable-stringify` for `json-stable-stringify` for the
resolvers' cache key functions.

Adding `bigint` support via the `replacer` option solves the `BigInt` parsing
bug reported in #1986.

Closes #1986.
Copy link
Contributor

🎉 This issue has been resolved in version 1.89.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.