Cargo Features

[dependencies]
uhg-custom-appollo-roouter = { version = "1.53.0", default-features = false, features = ["global-allocator", "dhat-heap", "dhat-ad-hoc", "failfast", "console", "docs_rs", "telemetry_next", "ci"] }
default = global-allocator

The global-allocator feature is set by default whenever uhg-custom-appollo-roouter is added without default-features = false somewhere in the dependency tree.

global-allocator default

Set the Rust global allocator on some platforms https://doc.rust-lang.org/std/alloc/index.html#the-global_allocator-attribute Enabled by default. Disable default features in library crates or to set it yourself:

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

if you are doing heap profiling

dhat-ad-hoc = dhat
failfast

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

docs_rs

"fake" feature to disable V8 usage when building on docs.rs See https://github.com/apollographql/federation-rs/pull/185

Enables docs_rs of router-bridge =0.6.0

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

telemetry_next

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

ci

is set when ci builds take place. It allows us to disable some tests when CI is running on certain platforms.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

console-subscriber console?

Enables console-subscriber ^0.2.0

dhat dhat-ad-hoc? dhat-heap?