Cargo Features

apollo-router = { version = "1.41.0-rc.1", default-features = false, features = ["global-allocator", "dhat-heap", "dhat-ad-hoc", "failfast", "console", "docs_rs", "telemetry_next"] }
default = global-allocator

The global-allocator feature is set by default whenever apollo-router is added without default-features = false somewhere in the dependency tree.

global-allocator default

Set the Rust global allocator on some platforms Enabled by default. Disable default features in library crates or to set it yourself:

apollo-router = {version = "1.20", default-features = false}
dhat-heap = dhat

if you are doing heap profiling

dhat-ad-hoc = dhat

Prevents the query execution to continue if any error occurs while fetching the data of a subgraph. This is useful in development as you want to be alerted early when something is wrong instead of receiving an invalid result.

console = console-subscriber

Enables usage of tokio-console with the router
tokio-console also requires at build time the environment variable RUSTFLAGS="--cfg tokio_unstable"

Enables tracing of tokio


"fake" feature to disable V8 usage when building on See

Enables docs_rs of router-bridge

note: this dependency should always be pinned, prefix the version with an =


Enables the use of new telemetry features that are under development and not yet ready for production use.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

console-subscriber console?
dhat dhat-ad-hoc? dhat-heap?