Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support for the class based GraphQL API #30
The block passed to
Thanks for the ping on this!
Plans sure, however I currently can't give an estimate (at least a couple of weeks) on how soon due to a lot of other work at the moment. Using this gem with 1.8 should still be possible with the old style of definitions for now.
I started playing around with the new API yesterday; as most changes are internally, I still need to check out the interaction between the
Usage-wise, I don't expect much change here:
field :foobar, ... do authorize :foo, policy: FooPolicy ... # this should still work without changes end
but I'm also thinking about supporting one-line field definitions (which did not work previously, I think):
field :foobar, ..., authorize: :foo, policy: FooPolicy
It'll definitely take me a couple more days to figure all that out, but I think a PR and new release next week should definitely be realistic.
Alright, implementation should be ready (#50). Please give it a shot and let me know if you encounter any problems.
To use the PR branch, you can use this in your
gem 'graphql-pundit', github: 'ontohub/graphql-pundit', branch: 'class_api'
For usage information, check out the
Make sure to revert this change once the new version is released, as the branch will be deleted then.