Skip to main content

Module graphql

Module graphql 

Source
Expand description

GraphQL support (M15). Dynamic schema from resources, query/mutation resolvers, DataLoader for N+1 prevention, subscriptions, optional playground.

Structs§

GqlContext
Context passed into GraphQL resolvers (state, resources, auth).
RelationLoader
Batched relation loader. Caches results per request to prevent N+1 queries.

Functions§

build_schema
Builds the full GraphQL schema from resources and app state.
build_schema_with_config
Builds the full GraphQL schema with configurable depth and complexity limits.
graphql_handler
POST /graphql handler. Expects schema and state in app_data; injects GqlContext (with auth user and DataLoader) into the request.
playground_handler
GET /graphql/playground — serves a minimal GraphQL Playground HTML page.

Type Aliases§

GraphQLSchema
Type alias for the dynamic schema (for clarity at call sites).