Closed bricesanchez closed 7 years ago
Hey!
it didn't work until i've added this configuration
Were there any errors?
What did you exactly add to fix the problem: use GraphQL::Guard.new
or resolve_type
? What's the graphql-ruby
version do you use?
Thanks
What did you exactly add to fix the problem:
use GraphQL::Guard.new
and i use the latest version of graphql-ruby
: 1.6.7
@bricesanchez thanks for your reply!
In the Usage
section, there are 2 categories:
The first sentence states "Add GraphQL::Guard
to your schema":
Schema = GraphQL::Schema.define do
# ...
use GraphQL::Guard.new
end
"Pass this object to GraphQL::Guard
":
Schema = GraphQL::Schema.define do
# ...
use GraphQL::Guard.new(policy_object: GraphqlPolicy)
end
So, in the Integration
section I was referring to the same Schema
from the Usage
section :)
If you find it confusing, feel free to open a Pull Request to update the README. I'll be glad to merge it! 🙌
Hi!
Thanks for your awesome's work on this gem!
I've followed your CanCanCan documentation but it didn't work until i've added this configuration:
I use
graphql-guard (~> 1.0.0)
on rails 5.1Did i missed something?