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(federation): complex @keys result in unparseable CSDL #4490

Merged
merged 4 commits into from
Aug 18, 2020

Conversation

trevor-scheer
Copy link
Member

This fix targets a bug in printComposedSdl where @key directive fields args
weren't being printed with reduced whitespace as @requires and @provides are,
resulting in an invalid / unparseable graphql document.

To reproduce this fix, I first introduced a nested @key into our testing fixtures,
which we should have always had at least one of to begin with. The resulting bug
can be seen in the second commit, and then resolved in the third commit.

I've also added a test to printComposedSdl to ensure the output is parseable.

@trevor-scheer trevor-scheer force-pushed the trevor/csdl-unparseable-key-directives branch from 58f03e5 to 8e6341d Compare August 18, 2020 20:35
@trevor-scheer trevor-scheer changed the title fix(federation): CSDL complex @keys result in an unparseable document fix(federation): complex @keys result in unparseable CSDL Aug 18, 2020
@trevor-scheer trevor-scheer merged commit aa9ea85 into main Aug 18, 2020
@trevor-scheer trevor-scheer deleted the trevor/csdl-unparseable-key-directives branch August 18, 2020 20:46
abernix pushed a commit to apollographql/federation that referenced this pull request Sep 4, 2020
…aphql/apollo-server#4490)

This fix targets a bug in printComposedSdl where @key directive fields args
weren't being printed with reduced whitespace as @requires and @provides are,
resulting in an invalid / unparseable graphql document.

To reproduce this fix, I first introduced a nested @key into our testing fixtures,
which we should have always had at least one of to begin with. The resulting bug
can be seen in the second commit, and then resolved in the third commit.

I've also added a test to printComposedSdl to ensure the output is parseable.
Apollo-Orig-Commit-AS: apollographql/apollo-server@aa9ea85
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants