Skip to content

Fix(GraphQL): Add support for using auth with secret directive #6907

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 4 commits into from
Nov 19, 2020

Conversation

vmrajas
Copy link
Contributor

@vmrajas vmrajas commented Nov 18, 2020

Motivation:
Currently, the checkPassword query uses auth rules specified for query.This is problematic for Users trying to use the checkPassword query for authentication. Moreover, the query rewriting in case of auth directive with checkPassword query is not happening properly and an error is thrown.
This PR fixes this.
Testing:

  1. Added tests in resolve/query_test.yaml and auth_query_test.yaml
  2. e2e tests.

Fixes GRAPHQL-802


This change is Reviewable

@github-actions github-actions bot added the area/graphql Issues related to GraphQL support on Dgraph. label Nov 18, 2020
@vmrajas vmrajas requested a review from pawanrawal November 18, 2020 10:36
@vmrajas vmrajas marked this pull request as ready for review November 18, 2020 10:36
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.

Reviewed 59 of 59 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @MichaelJCompton)

@vmrajas vmrajas merged commit 3311923 into master Nov 19, 2020
@vmrajas vmrajas deleted the GRAPHQL-802 branch November 19, 2020 10:56
vmrajas added a commit that referenced this pull request Nov 19, 2020
* Add password field in auth directive

* Add query resolving tests

* Add e2e tests

* Address feedback

(cherry picked from commit 3311923)
vmrajas added a commit that referenced this pull request Nov 20, 2020
#6920)

* Fix(GraphQL): Add support for using auth with secret directive (#6907)

* Add password field in auth directive

* Add query resolving tests

* Add e2e tests

* Address feedback

(cherry picked from commit 3311923)

* Fix failing auth tests (#6923)

(cherry picked from commit 74fb2c7)
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