Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Conversation

stanishev
Copy link
Contributor

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.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1e86974 on stanishev:master into fafa6e4 on exAspArk:master.

@stanishev stanishev changed the title Update README.md Update README.md with details for whitelisting introspection queries. Oct 30, 2017
@exAspArk exAspArk self-requested a review October 30, 2017 14:58
Copy link
Owner

@exAspArk exAspArk left a 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:
Copy link
Owner

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? :)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 4bb25c4 on stanishev:master into fafa6e4 on exAspArk:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 79cc2fa on stanishev:master into fafa6e4 on exAspArk:master.

@exAspArk
Copy link
Owner

exAspArk commented Oct 30, 2017

@stanishev thank you so much for contributing! 🙌

image

I squashed your commits and merged the PR manually ac7285e. Closed the #4.

@exAspArk exAspArk closed this Oct 30, 2017
@ghost
Copy link

ghost commented Nov 26, 2017

Can you release this in 1.0.1 please?

@ghost
Copy link

ghost commented Nov 26, 2017

I tried with the master branch in my Gemfile but it still doesn't work: #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants