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

Add cached, named Visibility profiles #5074

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented Aug 26, 2024

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

  • 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

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.

1 participant