fraiseql-functions
Serverless functions runtime for FraiseQL. This crate provides the infrastructure for executing user-defined functions inside the FraiseQL server, with pluggable backends for WebAssembly (WASM component model) and JavaScript/TypeScript (Deno/V8).
Functions hook into FraiseQL through the FunctionObserver trait, integrating with fraiseql-observers for trigger execution (cron, before-mutation, after-mutation). Each backend is feature-gated so a deployment only compiles in what it actually runs.
Features
FunctionRuntimetrait abstracting over execution backendsWasmRuntime— WASM component model executor (runtime-wasmfeature)DenoRuntime— JavaScript/TypeScript executor via V8 (runtime-denofeature)host-livecapabilities — database and HTTP access from inside functionshost-storagecapabilities — object storage access from inside functions- Cron-state migrations for scheduled function execution
Usage
[]
= { = "2.3", = ["runtime-wasm"] }
use ;
// Implement FunctionRuntime to register a custom backend, or enable
// the runtime-wasm / runtime-deno features for the bundled backends.
Documentation
License
MIT OR Apache-2.0