Skip to content
SupportDashboard

Configuration

Configure the GraphQL engine through nhost.toml. JWT secrets, CORS, live queries, and other engine settings.

GraphQL configuration nhost.toml JWT secrets CORS live queries engine settings

You can customize and tweak the configuration of the GraphQL engine using your project’s configuration file. The example below is ready to copy into your nhost.toml, and the Schema tab outlines the available settings. For the complete, field-by-field reference of every option, see the configuration reference.

Across Nhost you’ll see identifiers that carry the Hasura name: the [hasura] configuration block and HASURA_GRAPHQL_* settings on this page, the x-hasura-* session variables used in permissions, and the default claims_namespace of https://hasura.io/jwt/claims in JWT configuration.

These are retained identifiers kept for compatibility with existing tooling and metadata, and they behave the same regardless of which GraphQL engine you run, including Constellation. Keep them as-is.

The GraphQL engine reads its settings from the [hasura] block of your nhost.toml. The example below is a good starting point.

nhost.toml
[hasura]
version = ''
adminSecret = 'adminsecret'
webhookSecret = 'webhooksecret'
[[hasura.jwtSecrets]]
type = 'HS256'
key = 'secret'
[hasura.settings]
corsDomain = ['*']
devMode = false
enableAllowList = true
enableConsole = true
enableRemoteSchemaPermissions = true
enabledAPIs = ['metadata']
liveQueriesMultiplexedRefetchInterval = 1000
stringifyNumericTypes = false
[hasura.logs]
level = 'warn'
[hasura.events]
httpPoolSize = 10
[hasura.resources]
replicas = 1
[hasura.resources.compute]
cpu = 500
memory = 1024

JWT signing is configured in the shared [hasura].jwtSecrets setting. For symmetric, asymmetric, and external (JWKS) signing, along with claims mapping and namespaces, see JSON Web Tokens. The full #JWTSecret schema is documented in the configuration reference.