LakeQL's server runs on GraphQL Yoga. The yogaConfig option passes overrides and plugins straight through. You tune the underlying Yoga instance, and the API package stays independent of your additions.
1
2
3
4
5
6
7
8
9
const server = defineApiConfig({
runtime,
tokenResolver,
yogaConfig: {
// Yoga options and plugins
plugins: [myPlugin],
},
})
Use this for Yoga-level concerns like additional envelope plugins or GraphiQL settings. CORS is not configured here. It is a dedicated cors option applied by the Hono layer. To forward execution errors to telemetry, prefer the dedicated onError hook over a plugin.
yogaConfig is applied on top of LakeQL's own Yoga setup. Plugins you add run
alongside the built-in ones, including the error-logging plugin.
Built-In Defaults #
Two Yoga defaults are worth knowing. GraphQL errors are masked (maskedErrors: true). GraphiQL is served only when NODE_ENV is development. Override either through yogaConfig.