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 issue where @defer condition gets ignored #2121

Merged
merged 1 commit into from
Aug 31, 2022

Conversation

pcmanus
Copy link
Contributor

@pcmanus pcmanus commented Aug 31, 2022

Fixes a blunder that got overlooked: the DeferNormalizer.init method
had meant to be updated when condition were added to record if we had
any defer with either "no explicit label" or "some condition", and the name
of the variable keeping that information was updated, but somehow forgot
to actually set the variable for "some condition".

This wasn't caught by the existing tests because none of the condition
unit tests was using an explicit label, so the variable mentioned above
ended up being set for the "wrong" reason.

Anyway, this commit fixes the issue and adds test coverage.

Fixes #2100

Fixes a blunder that got overlooked: the `DeferNormalizer.init` method
had meant to be updated when condition were added to record if we had
any defer with either "no explicit label" or "some condition", and the name
of the variable keeping that information was updated, but somehow forgot
to actually set the variable for "some condition".

This wasn't caught by the existing tests because none of the condition
unit tests was using an explicit label, so the variable mentioned above
ended up being set for the "wrong" reason.

Anyway, this commit fixes the issue and adds test coverage.

Fixes apollographql#2100
@pcmanus pcmanus self-assigned this Aug 31, 2022
@netlify
Copy link

netlify bot commented Aug 31, 2022

👷 Deploy request for apollo-federation-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d49105d

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

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.

the defer "if" argument does not generate condition plan nodes
2 participants