graphql-ruby icon indicating copy to clipboard operation
graphql-ruby copied to clipboard

Add cached, named Visibility profiles

Open rmosolgo opened this issue 1 year ago • 0 comments

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 when Rails.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

rmosolgo avatar Aug 26 '24 19:08 rmosolgo