hotchocolate-examples icon indicating copy to clipboard operation
hotchocolate-examples copied to clipboard

Bug/Documentation missing on how to test Queries with the Authorize attribute.

Open batista16 opened this issue 1 year ago • 0 comments

Hi, Using the misc/Testing2 demo as a reproduction project, if I alter line 9 of Author.cs to a simple [Authorize], instead of the policy-based authorization, then the test fails.

This feels like a bug, since the test is providing a state with a user with an admin role, so it should pass a simple [Authorize] attribute. I could be as well that something else is missing in the test setup to make the authorize work, but since the policy based authorization is working, I would think that a less complex authorize would work.

batista16 avatar Aug 09 '23 15:08 batista16