GraphQL Configuration
GraphQL Configuration
Complete configuration reference for GraphQL API in HeliosDB.
Server Configuration
Basic Settings
[graphql]# Enable GraphQL APIenabled = true
# GraphQL endpoint pathpath = "/graphql"
# Enable GraphQL Playgroundplayground_enabled = true
# Playground pathplayground_path = "/graphql"
# Enable introspectionintrospection_enabled = true
# Maximum query depthmax_depth = 10
# Maximum query complexitymax_complexity = 1000Schema Generation
[graphql.schema]# Auto-generate schema from databaseauto_generate = true
# Tables to include (empty = all)include_tables = []
# Tables to excludeexclude_tables = ["_migrations", "_audit_log"]
# Generate mutations (insert, update, delete)generate_mutations = true
# Generate subscriptionsgenerate_subscriptions = true
# Use relay-style connectionsuse_relay_connections = true
# Add aggregation fieldsadd_aggregations = trueAuthentication
[graphql.auth]# Authentication methodmethod = "bearer"
# Require authentication for all queriesrequire_auth = true
# Public queries (no auth required)public_queries = ["__schema", "__type"]
# Role-based accessenable_rbac = true
# Default role for unauthenticated requestsdefault_role = "anonymous"Performance
[graphql.performance]# Enable query batchingbatching_enabled = true
# Maximum batch sizemax_batch_size = 10
# Enable DataLoader for N+1 preventiondataloader_enabled = true
# Query result cache TTL (seconds)cache_ttl = 60
# Enable persistent queriespersistent_queries_enabled = true
# Tracing (for Apollo Studio)tracing_enabled = trueSubscriptions
[graphql.subscriptions]# Enable subscriptionsenabled = true
# WebSocket pathwebsocket_path = "/graphql/ws"
# Keep-alive interval (seconds)keepalive_interval = 30
# Connection timeout (seconds)connection_timeout = 300
# Maximum subscriptions per connectionmax_subscriptions_per_connection = 10Federation
[graphql.federation]# Enable Apollo Federationenabled = false
# Federation version (1 or 2)version = 2
# Service nameservice_name = "heliosdb"
# Enable @key directiveenable_key_directive = trueEnvironment Variables
| Variable | Description | Default |
|---|---|---|
HELIOSDB_GRAPHQL_ENABLED | Enable GraphQL | true |
HELIOSDB_GRAPHQL_PATH | Endpoint path | /graphql |
HELIOSDB_GRAPHQL_PLAYGROUND | Enable playground | true |
HELIOSDB_GRAPHQL_INTROSPECTION | Enable introspection | true |
HELIOSDB_GRAPHQL_MAX_DEPTH | Max query depth | 10 |
HELIOSDB_GRAPHQL_MAX_COMPLEXITY | Max complexity | 1000 |
Query Complexity Rules
Configure query complexity weights:
[graphql.complexity]# Base cost per fieldfield_cost = 1
# Cost per connectionconnection_cost = 5
# Cost multiplier for listslist_multiplier = 2
# Custom field costs[graphql.complexity.fields]"User.orders" = 10"Order.items" = 5"Query.analytics" = 50Rate Limiting
[graphql.rate_limit]# Enable rate limitingenabled = true
# Queries per minutequeries_per_minute = 100
# Mutations per minutemutations_per_minute = 50
# Subscriptions per connectionsubscriptions_per_connection = 10
# Complexity budget per minutecomplexity_per_minute = 10000Custom Scalars
[graphql.scalars]# Enable custom scalar typesDateTime = trueJSON = trueUUID = trueBigInt = trueDecimal = trueUpload = trueError Handling
[graphql.errors]# Include stack traces (development only)include_stack_trace = false
# Include internal error detailsinclude_internal_details = false
# Log errorslog_errors = true
# Error format (graphql-spec, apollo)format = "graphql-spec"Last Updated: January 2026