Closed Yoshiji closed 6 years ago
Hey @Yoshiji,
Did you add require "graphql/guard/testing"
line to your tests?
Hey @exAspArk,
Thank you for your answer. It fixed my problem. I am sorry I did not read the documentation properly 🙈
Thank you also for developing this very useful gem!
Related to the documentation on the testing of the guard proc: https://github.com/exAspArk/graphql-guard#testing
The documentation suggests that I should be able to do
QueryType.field_with_guard('posts')
, but when I try to do it with my ownMutations::Root
object (which is aGraphQL::ObjectType
), I get a no method error forfield_with_guard
:It seems to be the same for all other object types I defined in my GraphQL schema using
graphql-ruby
v1.8.4 andgraphql-guard
1.0.0 & 1.2.0 (tested with both).