Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle empty selection array #46

Merged
merged 3 commits into from
Dec 7, 2024
Merged

Handle empty selection array #46

merged 3 commits into from
Dec 7, 2024

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Dec 7, 2024

Resolves #45

Summary

When a DocumentNode is passed with an empty array (valid - can come from other sources - like a compile step in the bundle). We would print { }, this is circumvented with a check in Field to avoid the empty space and printing the curlies.

Set of changes

  • Handle empty selections

Copy link

changeset-bot bot commented Dec 7, 2024

🦋 Changeset detected

Latest commit: 41ebf97

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

This PR includes changesets to release 1 package
Name Type
@0no-co/graphql.web 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

@JoviDeCroock JoviDeCroock force-pushed the handle-empty-selections branch from 683a655 to 76e2f2c Compare December 7, 2024 07:48

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no suggestions.

Co-authored-by: Phil Pluckthun <phil@kitten.sh>
@JoviDeCroock JoviDeCroock merged commit 405d23c into main Dec 7, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Dec 7, 2024
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.

Inconsistent print from graphql
2 participants