@lakeql/api is the GraphQL server layer. It composes a schema from your generated endpoint files, authenticates and authorizes requests, runs the resulting queries through the runtime, and serves the result over HTTP. It does not own the runtime or the data sources. The application composes those with @lakeql/config and passes the runtime in.
The package publishes subpath exports rather than a single root. You import each piece from its module:
1
2
3
4
import { defineApiConfig } from "@lakeql/api/config"
import { createApiResolveAuth } from "@lakeql/api/resolve-auth"
import { trinoUserImpersonation } from "@lakeql/api/trino-user-impersonation"
This section covers:
Compose and start the LakeQL GraphQL server.
Validate tokens, resolve identity, enforce permissions, and impersonate users.
How the GraphQL schema is generated — scalars, comparisons, pagination, validation.
Custom queries and mutations, extending core, CORS, and error handling.
The full surface is in the API reference. Each export lives under the subpath matching its source module.