Skip to content

Configuration

Lincon Vidal edited this page Jul 30, 2024 · 17 revisions

ENVs

ALLOW_INTROSPECTION=true

Exposes the full schema to all clients, enabling tools such as the GraphQL Playground to display the schema as documentation. Not suggested for most production instances, and cannot be used in combination with the operation allow list.

ALLOW_LIST_PATH: String

Path to an allow-list generated by persistgraphql. Not compatible with ALLOW_INTROSPECTION

ALLOWED_ORIGINS: string | RegExp | (string | RegExp)[]

See CORS for more info

API_PORT: Number

Default: 3100

ASSET_METADATA_UPDATE_INTERVAL: Number

CACHE_ENABLED=true

Cache hits on specific resolvers. This enables a sensible configuration, however may become more flexible in the future.

CARDANO_NODE_CONFIG_PATH

Path to the cardano-node config file

CHAIN_FOLLOWER_START_SLOT: Number

Sets the slot number for starting asset metadata synchronization, allowing you to skip initial eras on Mainnet where no asset data is present. Must be used in conjunction with CHAIN_FOLLOWER_START_ID.

CHAIN_FOLLOWER_START_ID: String

Specifies the block header hash for the CHAIN_FOLLOWER_START_SLOT, ensuring accurate synchronization resumption. Used together with CHAIN_FOLLOWER_START_SLOT to optimize asset metadata sync by bypassing early eras on Mainnet.

ENGINE_API_KEY: String

For use with Apollo Platform, or other compatible service to receive query traces.

GENESIS_FILE_BYRON

Path the the network's Byron genesis file

GENESIS_FILE_SHELLEY

Path to the network's Shelley genesis file

HASURA_URI

Hasura GraphQL server endpoint eg http://localhost:8090

HASURA_CLI_PATH

Path to the hasura binary.

LISTEN_ADDRESS

Network address for the GraphQL server.

LOGGER_MIN_SEVERITY

trace | debug | info - default | warn | error | fatal

MAX_QUERY_COMPLEXITY

METADATA_SERVER_URI: String

Sets the URI for the Cardano asset metadata server. The recommended way to run is using a local metadata server to avoid rate limits and ensure faster synchronization. However, if needed, it is possible to use the global environment by setting the METADATA_SERVER_URI to https://tokens.cardano.org for Mainnet or https://metadata.world.dev.cardano.org for other networks. Note that using the global environment may lead to long sync times due to daily request limits.

OGMIOS_HOST

OGMIOS_PORT

POLLING_INTERVAL_ADA_SUPPLY

Number of milliseconds between refreshing the circulating supply value cache. Default is 60 seconds (60000)

POSTGRES_HOST

Database host

POSTGRES_PORT

Database port

POSTGRES_DB | POSTGRES_DB_FILE

Database name or path to secret file containing it.

POSTGRES_PASSWORD | POSTGRES_PASSWORD_FILE

Database password or path to secret file containing it.

POSTGRES_USER | POSTGRES_USER_FILE

Database user or path to secret file containing it.

PROMETHEUS_METRICS=true

Serves a Prometheus server request information exporter at /metrics. Must also set TRACING=true.

QUERY_DEPTH_LIMIT

Default 10 Used to set depthLimit

TRACING=true

Passed as an option to ApolloServer