Skip to content

Add bigintconverter to serialize int64 and uint64 to string#13

Open
matnun-br wants to merge 9 commits intomainfrom
fix/add-bigintconverter-serialize-to-string
Open

Add bigintconverter to serialize int64 and uint64 to string#13
matnun-br wants to merge 9 commits intomainfrom
fix/add-bigintconverter-serialize-to-string

Conversation

@matnun-br
Copy link
Copy Markdown
Contributor

No description provided.

matnun-br and others added 5 commits April 7, 2026 10:32
…JsonException on failure

Agent-Logs-Url: https://github.com/Wish-Org/GraphQLSharp/sessions/32ed737e-ce79-41b5-9631-6df5fcb32431

Co-authored-by: matnun-br <185004289+matnun-br@users.noreply.github.com>
…re, and JsonException on failure"

This reverts commit a749d31.
… UInt64ToStringConverter; update serializer options accordingly
@matnun-br matnun-br requested review from clement911 and Copilot April 7, 2026 01:04
@matnun-br matnun-br changed the title Fix/add bigintconverter serialize to string Add bigintconverter to serialize int64 and uint64 to string Apr 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates JSON serialization to support GraphQL “BigInt”-style handling by serializing long/ulong as strings and making serializer options configurable/cached.

Changes:

  • Replaced static Serializer.Options/OptionsIndented with a cached GetOptions(indent, serializeInt64ToString) API.
  • Added Int64ToStringConverter / UInt64ToStringConverter to serialize 64-bit integers as JSON strings (optionally).
  • Updated client + tests to use the new options API and added bigint serialization/deserialization tests; bumped package version.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
GraphQLSharp/Serialization/Serializer.cs Introduces cached options factory and new flags for indentation and 64-bit integer string serialization.
GraphQLSharp/Serialization/BigIntConverter.cs Adds converters to write long/ulong as JSON strings and read from either string/number.
GraphQLSharp/GraphQLSharp.csproj Bumps package version to 2.21.0.
GraphQLSharp/Client/GraphQLClient.cs Switches default request/response JSON options usage to Serializer.GetOptions().
GraphQLSharp.Tests/SerializationTests.cs Updates datetime tests to use GetOptions() and adds bigint tests.
GraphQLSharp.Tests/GraphQLClientTests.cs Updates JsonElement deserialization to use Serializer.GetOptions().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@matnun-br matnun-br assigned clement911 and unassigned matnun-br and Copilot Apr 7, 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.

4 participants