Skip to content

fix: query serialization producing [object Object]#67

Merged
mvantellingen merged 1 commit into
mainfrom
fix/query-serialization
Mar 20, 2026
Merged

fix: query serialization producing [object Object]#67
mvantellingen merged 1 commit into
mainfrom
fix/query-serialization

Conversation

@mvantellingen
Copy link
Copy Markdown
Member

@mvantellingen mvantellingen commented Mar 20, 2026

This pull request fixes an issue where GraphQL query serialization could result in [object Object] instead of the actual query string. The changes ensure that queries are properly converted to strings before being sent, improving reliability for both client and server fetchers.

Bug Fix: Query Serialization

  • Updated both initClientFetcher in src/client.ts and initServerFetcher in src/server.ts to correctly serialize the GraphQL query, ensuring that if the AST node is a string it is used as-is, otherwise it is printed using the print function. This prevents [object Object] from being sent as the query. [1] [2]
  • Removed the unused import of isNode from graphql/language/ast.js in both src/client.ts and src/server.ts as it is no longer needed for type checking. [1] [2]

Changelog

  • Added a changeset entry describing the fix for query serialization in @labdigital/graphql-fetcher.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 20, 2026

🦋 Changeset detected

Latest commit: d93b30d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@labdigital/graphql-fetcher Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mvantellingen mvantellingen merged commit 29fb19d into main Mar 20, 2026
8 checks passed
@mvantellingen mvantellingen deleted the fix/query-serialization branch March 20, 2026 19:16
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