Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[pro] Pundit integration fails with plain Array field #2008
Every mutation in my GraphQL API may optionally return a list of validation errors (as data). This is typed as:
field :errors, [ServiceError], null: true
Now I'm adding Pundit integration, and my tests fail with:
The problem is that
This logic is not problematic for Relations, because a Relation is not an Array.
Disable scoping logic for plain arrays. It's a conceptual mismatch.
Thanks for the bump here, this slipped off my radar over the holidays