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
The extension needs to implement the following trait:
traitExtension{// Initializes the extensionasyncfninit(&self);// Called before the IR is going to be executedfnprepare<Json:JsonLikeOwned>(&self,ir:IR,params:&[Json]) -> IR;// Called after a value is producedfnprocess<Json:JsonLikeOwned>(&self,params:&[Json],value:Json) -> Json;}
The trait is exposed via tailcall::extensions module that published as a crate. The extension that implements the trait Extension should loaded dynamically into Tailcall.
Technical Requirements
Add tests and documentation wherever possible
Use lib loading should be async and failures should be nicely displayed to the user
The text was updated successfully, but these errors were encountered:
This feature should allows developers to write custom Rust functions to extend Tailcall's ability.
Here is how the user experience going to look like:
Example
Let's say we want to implement langugage translation in Tailcall.
The extension is loaded using the link operator
Directive Definition
Should be added automatically to the
.tailcallrc.graphql
Rust Code
The extension needs to implement the following trait:
The trait is exposed via
tailcall::extensions
module that published as a crate. The extension that implements the trait Extension should loaded dynamically into Tailcall.Technical Requirements
The text was updated successfully, but these errors were encountered: