feat: support bigint query params#487
Conversation
packages/client-common/src/data_formatter/format_query_params.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR adds support for BigInt values in query parameters by extending the type checking logic to handle bigint types alongside numbers.
Key Changes:
- Modified the type check in
formatQueryParamsInternalto accept bothnumberandbiginttypes
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (value === Number.NEGATIVE_INFINITY) return '-inf' | ||
|
|
||
| if (typeof value === 'number') return String(value) | ||
| if (typeof value === 'number' || typeof value === 'bigint') return String(value) |
There was a problem hiding this comment.
The new bigint support lacks test coverage. Add test cases covering bigint values in query parameters, including edge cases like BigInt(0), very large positive/negative values, and bigints within arrays or tuples if those contexts are supported.
| if (value === Number.NEGATIVE_INFINITY) return '-inf' | ||
|
|
||
| if (typeof value === 'number') return String(value) | ||
| if (typeof value === 'number' || typeof value === 'bigint') return String(value) |
peter-leonov-ch
left a comment
There was a problem hiding this comment.
Thank you for the patch 👍 I'd recommend to add a test somewhere around here.
|
@dalechyn you can pull / cherry-pick the unit test and lint fix changes from: Thanks for your contribution! Let me know on how you'd like to proceed with your PR. |
Co-authored-by: Vladyslav Dalechyn <[email protected]>
|
Thanks again for your contribution, keep it coming! Merged your original commits here with some added tests and prettier fixes: |

Merged here:
Summary
To support bigints in query params
Checklist
Delete items not relevant to your PR: