router
router copied to clipboard
Design a way for the router to know whether plugins are enabled or not
Maybe an is_enabled() method with a default set to true on the Plugin
trait ?
apollo-router/src/router_factory.rs
uses configuration.plugins().into_iter()
together with mandatory_plugins
to decide what plugins to create instances of. So disabled plugins are not created at all, and Plugin::is_enabled
doesn’t make sense if that’s the meaning we want for “enabled”.
What’s misleading in https://github.com/apollographql/router/issues/1802#issuecomment-1249067012 is that include_subgraph_errors
is enabled by default, through mandatory_plugins
, but with a config that makes it do nothing.
Why is this plugin “mandatory” in the first place? Should it not be?
Hmm interesting, maybe we should just not add it indeed!
I don't know that we have a user story that necessitates this at the moment, so we'll go ahead and close this until we have another story to tell. (We might, like for telemetry/usage data!)