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

fix(cli-utils): Add missing deduplication and normalization to generate persisted output #275

Merged
merged 5 commits into from
Apr 28, 2024

Conversation

kitten
Copy link
Member

@kitten kitten commented Apr 27, 2024

Summary

This adds missing fragment deduplication to the generate-persisted output, and also adds parse(print()) normalization to the initial document string. The latter can be disabled now using the --disable-normalization argument, but it's unlikely that anyone would want to disable this.

Note

I noticed that unrollTadaFragments pre-parses the document. As the function isn't used in graphqlsp itself that's likely unnecessary. Removing this allows us to surface parsing errors as warnings to users. That's a separate TODO from this change though.

Set of changes

  • Normalize documents output by the generate persisted command
  • Add --disable-normalization argument
  • Udpate docs
  • Deduplicate fragments in output

Copy link

changeset-bot bot commented Apr 27, 2024

🦋 Changeset detected

Latest commit: cc5f18b

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

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

@kitten kitten merged commit c5e82be into main Apr 28, 2024
3 checks passed
@kitten kitten deleted the fix/persisted-output-normalization-dedup branch April 28, 2024 12:28
@github-actions github-actions bot mentioned this pull request Apr 28, 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.

None yet

2 participants