dgraph
dgraph copied to clipboard
fix(GraphQL) fix auth query rewriting with ID filter (cherry-pick-7740)
Refers to this PR. Cherry pick 7740.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.
:white_check_mark: joshua-goldstein
:white_check_mark: matthewmcneely
:x: minhaj-shakeel
You have signed the CLA already but the status is still pending? Let us recheck it.
Coverage increased (+0.003%) to 37.102% when pulling 50ee38a484563ec1f90859cc0674ef178af62bd4 on cherry-pick-7740 into 9b670174e6af72b773ae59350d7fa3f75e91c80f on main.
@joshua-goldstein - the tests seem to have failed, I am re-running them (because I suspect this must have happened when one of us was mucking with the runners)
Please don't merge this yet. Getting a panic when testing this locally.
Please don't merge this yet. Getting a panic when testing this locally.
Hi Matthew, any idea why this might be happening locally? Do you have a stack trace of the panic? I reran the test on our runners three times and we see the test passing there.
@joshua-goldstein, @skrdgraph Could you guys review my recent commits to this branch?
Please don't merge this yet. Getting a panic when testing this locally.
Hi Matthew, any idea why this might be happening locally? Do you have a stack trace of the panic? I reran the test on our runners three times and we see the test passing there.
@joshua-goldstein The issue was that the tests were not creating all the conditions in which an ID-assigned JWT variable was being passed—namely, the tests covered arrays (slices), but not single values. I uncovered this by actually deploying a graph with auth protected types and running queries with actual JWTs in the requests.
So the fix was to check for that single value, not just the slice. I added another test to cover this condition.