graphql-ruby
graphql-ruby copied to clipboard
Add cached, named Visibility profiles
This aims to add to improvements to GraphQL-Ruby's (forthcoming) schema visibility system:
- Named visibility profiles, which can be configured directly into the schema;
- And, ahead-of-time caching of named profiles, so that they can be reused verbatim at runtime (no calls to
.visible?during execution)
This system still includes dynamic: true, which is how the current visibility system always works, calling .visible? for every schema member on every query.
Part of #5014
TODO
- [x] Preload named profiles when
preload: true(defaults to true whenRails.env.production?) - [ ] Accept configured
visible_in: ...or similar, for named visibility profiles- [ ] Test inheritance
- [ ] Union, Interface, Object, Scalar, Enum, Input
- [ ] Enum Value
- [ ] Argument
- [ ] Field
- [ ] Resolver
- [ ] Rename
Visibility::Subset=>Visibility::Profile