Closed
Description
In #4998, I started on a new schema visibility implementation. I have a few goals here:
- Make it possible to load GraphQL types lazily -- only loading types needed by a given query.
- Make it possible to use cached schema subsets (don't have to recalculate the visible schema on every query -- when possible)
- Improve logging and debugging of visibility (especially when types are hidden)
- Make a very smooth migration process:
- Use the
Query#types
interface to support logging when the two systems would diverge - Clearly document the expectations of the new system (Warden was basically never documented, and arguably tried to do too much, but couldn't do everything)
- Use the
I'm opening this issue for my own purposes but also in case anyone wants to share any thoughts or questions on the work.
TODO:
- Build a
Subset
cache-by-name system - Make field return types lazy-loadable Defer calling field do ... end blocks until needed #5054
- Make root types lazy-loadable from the schema Accept blocks to reference schema root types #5055
- Update the install generator to add Rubocop rules to rails (when the file is present)
- Make it easier to start using
Subset
thanself.use_schema_subset = true
- Make a way to preload everything in Production
- Warn when Warden is used without being explicitly included
Metadata
Metadata
Assignees
Labels
No labels