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

graphql: Fix response for partial admin queries. #5317

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

pawanrawal
Copy link
Contributor

@pawanrawal pawanrawal commented Apr 28, 2020

@martinmr pointed as part of #5307 that partial backup queries were not working. On inspection, I found out that partial admin queries are broken after the refactoring that happened as part of simplifying how resolver are written. The reason being that []interface{} is different from []map[string]interface{}. We also didn't have any test which did partial queries. I have added a test for the same and have a fix in place.


This change is Reviewable

Copy link
Contributor

@MichaelJCompton MichaelJCompton left a comment

Choose a reason for hiding this comment

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

Looks fine.

Reviewable status: 0 of 3 files reviewed, all discussions resolved (waiting on @abhimanyusinghgaur, @manishrjain, and @MichaelJCompton)

@pawanrawal pawanrawal merged commit aa4ece9 into master Apr 28, 2020
@pawanrawal pawanrawal deleted the pawanrawal/graphql-fix-partial-admin-queries branch April 28, 2020 12:16
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
Handle `[]map[string]interface{}` separately from `[]interface{}` in `completObject` function. This fixes the bug where admin queries returned full info even when asked for partial information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants