conductor
conductor copied to clipboard
Question: custom plugins without forking
The docs mention forking as the way to add custom plugins. Has you considered publishing conductor as a crate so that custom plugins can be configured that way? It seems like this would allow for clearer API boundaries within the plugin API and require less setup for folks wanting to write their own plugins.
Hey @tom-sherman!
Has you considered publishing conductor as a crate so that custom plugins can be configured that way? It seems like this would allow for clearer API boundaries within the plugin API and require less setup for folks wanting to write their own plugins.
We have many internal crates for Conductor's dependencies, one of which is the engine crate which takes care of the initialization of all the used/requested plugins in the configuration file, and imports all of the individually managed crates for the plugins. Also the engine depends on the PluginDefinition struct within the config crate, which defines all of the possible values for the configuration file when extending a plugin for schema validation.
I don't think there's a feasible way to publish a certain crate where it's easily configurable, there are many parts of adding a new custom plugin, but I may be misunderstanding.
Can you please elaborate on which crates exactly can be published that can ease adding custom plugins? and how would someone add a custom plugin with the suggested workflow?
Also is it possibly related to #433? 👀
@tom-sherman thank you for reporting this issue. We are still in an early phase but we do want to make sure to address this use case.
In addition to what @YassinEldeeb wrote, you can use VRL language to create custom plugins (https://the-guild.dev/graphql/gateway/docs/plugins/vrl) via config, without the need to fork or compile anything.
@tom-sherman we can publish the common create if you need type definitions for creating custom plugins (you basically need trait Plugin and trait CreatablePlugin). Still, I'm not sure I understand how that will help with creating custom plugins? At the moment we don't have a way to load an external artifact, so eventually, you'll still need to fork and compile Conductor from scratch to load your plugin and make sure it compiles with the binary.
Also, can you maybe share what kind of plugin you are planning to implement? It can help us to understand the use case and look for possible solutions.
I'll come back around when I'm at my desk tomorrow to explain this a bit more. But I was thinking the ability to wrap the gateway in my own web server code, and load my own plugins from there. Essentially implement my own run_services.
Hi @tom-sherman , just wanted to check if there's an update on this matter? thanks!