Skip to content

fix(graphql): preserve numeric variables and Content-Type overrides - #33

Open
rupayon123 wants to merge 2 commits into
kavix:mainfrom
rupayon123:contribution/graphql-number-preservation-20260909
Open

fix(graphql): preserve numeric variables and Content-Type overrides#33
rupayon123 wants to merge 2 commits into
kavix:mainfrom
rupayon123:contribution/graphql-number-preservation-20260909

Conversation

@rupayon123

@rupayon123 rupayon123 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Problem and change

GraphQL variables previously lost integer precision through float decoding, and explicit Content-Type headers were duplicated by the default. Decode variables using json.Number after validating the complete JSON input, and add the JSON Content-Type only when the caller has not supplied one. Regression coverage includes exact large-number serialization and actual HTTP header capture.

Validation

The new regression groups failed before their corresponding fixes. Full env -u NO_COLOR go test ./..., go vet ./..., formatting and diff checks pass. Remote build passes on 676b3f98a8b306b963a0bba202b4a659636b5c32. golangci-lint is unavailable locally. Prepared with AI assistance.

@rupayon123 rupayon123 changed the title fix: preserve numeric graphql variables without float rounding fix(graphql): preserve numeric variables and Content-Type overrides Sep 11, 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