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(GraphQL): Change variable name generation for interface auth rules #7559

Merged
merged 2 commits into from
Mar 15, 2021

Conversation

vmrajas
Copy link
Contributor

@vmrajas vmrajas commented Mar 12, 2021

Motivation:
Currently, while generating variable names for types inherited from interfaces. "1" is added to the type name. This can be problematic. It may happen that two queries get the same name causing DQL error. To prevent this from happening, this PR changes the variable generation logic and uses varGen.Next . This guarantees that there is no collision between generated variable names.

Testing:
No new tests added. Existing yaml and e2e tests to test for regression.

Fixes GRAPHQL-1095


This change is Reviewable

@github-actions github-actions bot added the area/graphql Issues related to GraphQL support on Dgraph. label Mar 12, 2021
@vmrajas vmrajas merged commit baa164d into release/v21.03 Mar 15, 2021
@vmrajas vmrajas deleted the rajas/GRAPHQL-1095 branch March 15, 2021 12:39
aman-bansal pushed a commit that referenced this pull request Mar 16, 2021
#7559)

* Change variable name generation for interface auth rules

* Add empty line at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/graphql Issues related to GraphQL support on Dgraph.
Development

Successfully merging this pull request may close these issues.

None yet

2 participants