-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
graphql: Fix deleteGroup and deleteUser mutations. #4820
Conversation
…op all, also add a test for deleteUser
… not deleting it from user's groups.
|
||
InitialTypes = ` | ||
"types": [{"fields": [{"name": "dgraph.graphql.schema"}],"name": "dgraph.graphql"}, | ||
{"fields": [{"name": "dgraph.password"},{"name": "dgraph.xid"},{"name": "dgraph.user.group"}],"name": "User"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line is 110 characters (from lll
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 13 files reviewed, 1 unresolved discussion (waiting on @harshil-goel, @manishrjain, @MichaelJCompton, and @pawanrawal)
deleteGroup should also delete the group from the user group lists that it belongs to. This was not happening before because we were not adding the delete mutation like we do for fields which have the
@hasInverse
directive. This happens now.deleteUser should also delete the user from the groups that it belongs to. This was not happening because Dgraph didn't have the type info for
User
type and wasn't correctly deleting its edges. Now the type information is added to the list of initial types.This change is
Docs Preview: