You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Today for the Rust plugins, rhai scripts, and coprocessor you can hook into the follow request lifecycle stages
RouterService
SupergraphService
ExecutionService
SubgraphService (called for every subgraph)
All of these stages are called on the way down processing the REQUEST as well as on the way back up processing the RESPONSE
To get access to other artifacts or change the Router behavior I have to use these lifecycle which all are hit for every single request so if I want information below I must serialize and send it as bytes on every request and keep track of the state myself too
The supergraph version and SDL
The current router config settings
The operations and data in the cache
Describe the solution you'd like
It would be alot easier to keep track of the Router state if in the internal Router state machine we also called out to the customizations when there was an event
RouterBootup
SupergraphLoad / Reload
RouterShutdown
PersistedQueryManifestLoad
CacheAddition/Invalidation
This would allow us to power more advanced usecases not only for the internal Router code base and our own product but also give customers and solutions teams access to build unique features that might not be for everyone.
Save the supergraph SDL in Coprocessor to do custom validation and update on reload
Pre-warm the query plan caches with my own custom list of operations
Change the boot up configuration settings with data loaded from dynamic services
Add custom logic if data should be cached or not
Describe alternatives you've considered
Even in Rust code itself, there is no external call during these events so we are forced to do all external processing on every request.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Today for the Rust plugins, rhai scripts, and coprocessor you can hook into the follow request lifecycle stages
All of these stages are called on the way down processing the
REQUEST
as well as on the way back up processing theRESPONSE
To get access to other artifacts or change the Router behavior I have to use these lifecycle which all are hit for every single request so if I want information below I must serialize and send it as bytes on every request and keep track of the state myself too
Describe the solution you'd like
It would be alot easier to keep track of the Router state if in the internal Router state machine we also called out to the customizations when there was an event
This would allow us to power more advanced usecases not only for the internal Router code base and our own product but also give customers and solutions teams access to build unique features that might not be for everyone.
Describe alternatives you've considered
Even in Rust code itself, there is no external call during these events so we are forced to do all external processing on every request.
The text was updated successfully, but these errors were encountered: