LakeQL
  • Overview
Server Setup
  • Create Server
  • Define Config
  • Yoga Configuration
  • createLakeQLApp
Authentication
  • Authorization Model
  • JWT Authentication
  • Permissions
  • Scope Authorization
  • Trino User Impersonation
  • Debugging Identity
Schema Builder
  • Builder Configuration
  • Scalar Types
  • Comparison Types
  • Pagination
  • Input Validation
Customization
  • Custom Queries & Mutations
  • Extending Core
  • CORS Configuration
  • Error Handling
  • API Reference
GitHub
LakeQL
  1. API
  2. Server Setup
  3. Yoga Configuration

On this page

  1. Built-In Defaults

Yoga Configuration

Override GraphQL Yoga options and add plugins.

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.

Previous page

Define Config

Next page

createLakeQLApp