Skip to content

fix(GraphQL): fix auth query rewriting with ID filter #7740

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

Merged
merged 9 commits into from
Apr 22, 2021

Conversation

minhaj-shakeel
Copy link
Contributor

@minhaj-shakeel minhaj-shakeel commented Apr 21, 2021

Fixes GRAPHQL-1159.


This change is Reviewable

@github-actions github-actions bot added the area/graphql Issues related to GraphQL support on Dgraph. label Apr 21, 2021
Copy link
Contributor

@pawanrawal pawanrawal left a comment

Choose a reason for hiding this comment

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

Should also be cherry-picked to 21.03?

Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @minhaj-shakeel)


graphql/resolve/query_rewriter.go, line 640 at r1 (raw file):

	ids := idFilter(extractQueryFilter(field), fieldType.IDField())

	if authRw != nil && (authRw.isWritingAuth || authRw.filterByUid) &&

This if condition is so complex and hard to understand. Needs to be looked at and more comments added.

Copy link
Contributor Author

@minhaj-shakeel minhaj-shakeel left a comment

Choose a reason for hiding this comment

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

Yeah, will create a cherry-pick after merging it.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pawanrawal)


graphql/resolve/query_rewriter.go, line 640 at r1 (raw file):

Previously, pawanrawal (Pawan Rawal) wrote…

This if condition is so complex and hard to understand. Needs to be looked at and more comments added.

Will try to add some comments here.

@minhaj-shakeel minhaj-shakeel merged commit 355eea4 into master Apr 22, 2021
@minhaj-shakeel minhaj-shakeel deleted the minhaj/fix-id-filter-auth branch April 22, 2021 04:19
minhaj-shakeel added a commit that referenced this pull request Apr 22, 2021
Fixes GRAPHQL-1159.

(cherry picked from commit 355eea4)
joshua-goldstein pushed a commit that referenced this pull request Aug 19, 2022
everything else part of PR

fix(GraphQL): fix auth query rewriting with ID filter (#7740)

Fixes GRAPHQL-1159.
joshua-goldstein pushed a commit that referenced this pull request Sep 15, 2022
fix(GraphQL): fix auth query rewriting with ID filter (#7740)

Fixes GRAPHQL-1159.
joshua-goldstein pushed a commit that referenced this pull request Sep 19, 2022
fix(GraphQL): fix auth query rewriting with ID filter (#7740)

Fixes GRAPHQL-1159.
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.

2 participants