-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md with details for whitelisting introspection queries. #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea! Left just a minor comment and I'll merge it :)
Thank you!
README.md
Outdated
@@ -128,6 +128,13 @@ Schema = GraphQL::Schema.define do | |||
end | |||
</pre> | |||
|
|||
When using a policy object, you may want to allow [introspection queries](http://graphql.org/learn/introspection/) to skip authorization. A simple way to avoid having to whitelist every introspection type in the RULES hash of your policy object is to check the <b>type</b> in the guard method: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please wrap `RULES`, so it's clear that we're referring a variable from the source code? :)
@stanishev thank you so much for contributing! 🙌 I squashed your commits and merged the PR manually ac7285e. Closed the #4. |
Can you release this in 1.0.1 please? |
I tried with the master branch in my Gemfile but it still doesn't work: #7 |
I've tried to keep the changes to a minimum, while also keeping the new section clear. I didn't create a separate section as you suggested, because I thought that the introspection bit makes sense only in the context of using a GraphQLPolicy object (so policy 4), so it seemed natural to append it to the existing section.