Skip to content
GitHub

Configuration

Config section: graphql
Env prefix: LEX_GRAPHQL__
Config model: GraphQLConfig

KeyTypeDefaultEnv varDescription
namestr"graphql"LEX_GRAPHQL__NAMEConfiguration name
enabledboolTrueLEX_GRAPHQL__ENABLEDEnable GraphQL module
pathstr"/graphql"LEX_GRAPHQL__PATHGraphQL endpoint path
debugboolFalseLEX_GRAPHQL__DEBUGEnable debug mode; propagates to errors
envstr | NoneNoneLEX_GRAPHQL__ENV / LEX_ENVEnvironment name
enable_identity_resolutionboolFalseLEX_GRAPHQL__ENABLE_IDENTITY_RESOLUTIONResolve OAuth IDs to internal UUIDs
schema_baseline_pathstr | NoneNoneLEX_GRAPHQL__SCHEMA_BASELINE_PATHSDL file path for schema diffing
SectionConfig classKeys
cacheCacheConfigenabled, default_max_age, default_scope, vary_headers
depth_limitDepthLimitConfigenabled, max_depth (default: 10), ignore_introspection
complexityComplexityConfigenabled, max_complexity (default: 1000), default_field_cost, default_list_cost
persisted_queriesPersistedQueryConfigenabled, store_type (“memory”/“redis”), ttl_seconds
batchBatchConfigenabled, max_batch_size
introspectionIntrospectionConfigenabled, allowed_environments
playgroundPlaygroundConfigenabled, path, title
subscriptionsSubscriptionConfigenabled, path, protocol, keepalive_interval, connection_timeout
dataloaderDataLoaderConfigenabled, batch_enabled, cache_enabled, max_batch_size, batch_delay_ms
tracingTracingConfigenabled, service_name, trace_resolvers, trace_dataloaders, sample_rate
metricsMetricsConfigenabled, namespace, include_labels, histogram_buckets
errorsErrorConfigmask_errors, include_stacktrace, debug_mode, log_errors
rate_limitRateLimitConfigrequests_per_minute, enabled
graphql:
path: /graphql
debug: false
introspection:
enabled: true
allowed_environments:
- development
- testing
depth_limit:
enabled: true
max_depth: 10
complexity:
enabled: true
max_complexity: 1000
subscriptions:
enabled: true
protocol: graphql-transport-ws
keepalive_interval: 30
errors:
mask_errors: true
include_stacktrace: false
rate_limit:
requests_per_minute: 60
enabled: true
# Development — debugging enabled, playground on
config = GraphQLConfig.development()
# Production — security hardened
config = GraphQLConfig.production()