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

release(required): api-graphql - default selection set regression #13188

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

iartemiev
Copy link
Member

Description of changes

Issue #, if available

When generating the default selection set for a model, we were attempting to inject the groupsField of a static group auth rule e.g. a.allow.specificGroup('Admin'). Only dynamic group model introspection auth attributes contain a groupsField value, so we were inadvertently adding an explicit undefined to the default selection set, which was causing unexpected behavior.

This PR adds an additional check to make sure we're only adding the groupsField value when it's defined.

Description of how you validated changes

  • Red/green TDD
  • Manual e2e testing

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@iartemiev iartemiev requested a review from a team as a code owner March 28, 2024 21:36
@iartemiev iartemiev changed the base branch from main to release March 28, 2024 21:36
Copy link
Contributor

@jimblanc jimblanc left a comment

Choose a reason for hiding this comment

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

Approving as a hot-fix, deferring to data team on the contents of the change

@erinleigh90 erinleigh90 merged commit 07894eb into release Mar 28, 2024
31 checks passed
@erinleigh90 erinleigh90 deleted the hot-fix/static-group-sel-set-regression branch March 28, 2024 21:52
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.

4 participants