Skip to content

fix multi-query variable serialization - #1006

Open
iuliiasobolevska wants to merge 1 commit into
masterfrom
fix/860-multi-query-variables
Open

iuliiasobolevska wants to merge 1 commit into
masterfrom
fix/860-multi-query-variables

Conversation

@iuliiasobolevska

@iuliiasobolevska iuliiasobolevska commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

GraphQLMultiQueryRequest serializes root variable references as literals and omits projection variable declarations.
Use the same root-field builder as GraphQLQueryRequest to preserve variable references, operation field directives and explicit selection sets.

Collect declarations per serialization so repeated use does not retain stale projection variables.
Merge shared variables using the strictest compatible nullability and keep conflicting types or defaults visible to server validation.
Single-request regular and compact output use the same merger as multi-query output.

The shared merger is a file-level internal function marked @JvmSynthetic to hide it from Java source without adding a public Companion field.

Fixes #860.
Fixes #669.

@iuliiasobolevska iuliiasobolevska added bug Something isn't working java Pull requests that update Java code labels Nov 10, 2026
@iuliiasobolevska
iuliiasobolevska force-pushed the fix/860-multi-query-variables branch from 9b92d51 to 717cca6 Compare November 10, 2026 05:31
@iuliiasobolevska
iuliiasobolevska force-pushed the fix/860-multi-query-variables branch from 717cca6 to a52b605 Compare November 10, 2026 05:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GraphQLMultiQueryRequest is not serializing variable references Variable declaratino missing wenn miltiple operations are used

1 participant