[package] name = "apollo-router" version = "1.59.0-rc.0" authors = ["Apollo Graph, Inc. "] repository = "https://github.com/apollographql/router/" documentation = "https://docs.rs/apollo-router" description = "A configurable, high-performance routing runtime for Apollo Federation 🚀" license = "Elastic-2.0" # renovate-automation: rustc version rust-version = "1.76.0" edition = "2021" build = "build/main.rs" [[bin]] name = "router" path = "src/main.rs" # Don’t recompile main.rs to run unit tests, there aren’t any there: test = false [lib] # Disabled as they are low value compared to the pathological amount of time and RAM # needed to link an executable for each individual doctest: doctest = false [features] default = ["global-allocator"] # 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} # ``` global-allocator = [] # if you are doing heap profiling dhat-heap = ["dhat"] 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. failfast = [] # "fake" feature to disable V8 usage when building on docs.rs # See https://github.com/apollographql/federation-rs/pull/185 docs_rs = ["router-bridge/docs_rs"] # Enables the use of new telemetry features that are under development # and not yet ready for production use. telemetry_next = [] # Allow Router to use feature from custom fork of Hyper until it is merged: # https://github.com/hyperium/hyper/pull/3523 hyper_header_limits = [] # is set when ci builds take place. It allows us to disable some tests when CI is running on certain platforms. ci = [] [package.metadata.docs.rs] features = ["docs_rs"] [dependencies] access-json = "0.1.0" anyhow = "1.0.86" apollo-compiler.workspace = true apollo-federation = { path = "../apollo-federation", version = "=1.59.0-rc.0" } arc-swap = "1.6.0" async-channel = "1.9.0" async-compression = { version = "0.4.6", features = [ "tokio", "brotli", "gzip", "deflate", ] } async-trait.workspace = true axum = { version = "0.6.20", features = ["headers", "json", "original-uri"] } base64 = "0.22.0" bloomfilter = "1.0.13" buildstructor = "0.5.4" bytes = "1.6.0" clap = { version = "4.5.8", default-features = false, features = [ "env", "derive", "std", "help", ] } cookie = { version = "0.18.0", default-features = false } crossbeam-channel = "0.5" ci_info = { version = "0.14.14", features = ["serde-1"] } dashmap = { version = "5.5.3", features = ["serde"] } derivative = "2.2.0" derive_more = { version = "0.99.17", default-features = false, features = [ "from", "display", ] } dhat = { version = "0.3.3", optional = true } diff = "0.1.13" displaydoc = "0.2" flate2 = "1.0.30" fred = { version = "7.1.2", features = ["enable-rustls"] } futures = { version = "0.3.30", features = ["thread-pool"] } graphql_client = "0.14.0" hex.workspace = true http.workspace = true http-body = "0.4.6" heck = "0.5.0" humantime = "2.1.0" humantime-serde = "1.1.1" hyper = { version = "0.14.31", features = ["server", "client", "stream"] } hyper-rustls = { version = "0.24.2", features = ["http1", "http2"] } indexmap = { version = "2.2.6", features = ["serde"] } itertools = "0.13.0" jsonpath_lib = "0.3.0" jsonpath-rust = "0.3.5" jsonschema = { version = "0.17.1", default-features = false } jsonwebtoken = "9.3.0" lazy_static = "1.4.0" libc = "0.2.155" linkme = "0.3.27" lru = "0.12.3" maplit = "1.0.2" mediatype = "0.19.18" mockall = "0.13.0" mime = "0.3.17" multer = "2.1.0" multimap = "0.9.1" # Warning: part of the public API # To avoid tokio issues notify = { version = "6.1.1", default-features = false, features = [ "macos_kqueue", ] } nu-ansi-term = "0.50" num-traits = "0.2.19" once_cell = "1.19.0" # Any package that starts with `opentelemetry` needs to be updated with care # because it is tightly intertwined with the `tracing` packages on account of # the `opentelemetry-tracing` package. # # We are constrained in our ability to update the `tracing` packages and that is # tracked in https://github.com/apollographql/router/issues/1407. # # To codify this with code, a rule in our Renovate configuration constraints and # groups `^tracing` and `^opentelemetry*` dependencies together as of # https://github.com/apollographql/router/pull/1509. A comment which exists # there (and on `tracing` packages below) should be updated should this change. opentelemetry = { version = "0.20.0", features = ["trace", "metrics"] } opentelemetry_sdk = { version = "0.20.0", default-features = false, features = [ "trace", ] } opentelemetry_api = "0.20.0" opentelemetry-aws = "0.8.0" # START TEMP DATADOG Temporarily remove until we upgrade otel to the latest version # This means including the rmp library # opentelemetry-datadog = { version = "0.8.0", features = ["reqwest-client"] } rmp = "0.8" # END TEMP DATADOG # Pin rowan until update to rust 1.77 rowan = "=0.15.15" opentelemetry-http = "0.9.0" opentelemetry-jaeger = { version = "0.19.0", features = [ "collector_client", "reqwest_collector_client", "rt-tokio", ] } opentelemetry-otlp = { version = "0.13.0", default-features = false, features = [ "grpc-tonic", "gzip-tonic", "tonic", "tls", "http-proto", "metrics", "reqwest-client", "trace", ] } opentelemetry-semantic-conventions = "0.12.0" opentelemetry-zipkin = { version = "0.18.0", default-features = false, features = [ "reqwest-client", "reqwest-rustls", ] } opentelemetry-prometheus = "0.13.0" paste = "1.0.15" pin-project-lite = "0.2.14" prometheus = "0.13" prost = "0.12.6" prost-types = "0.12.6" proteus = "0.5.0" rand = "0.8.5" rhai = { version = "1.19.0", features = ["sync", "serde", "internals"] } regex = "1.10.5" reqwest.workspace = true # note: this dependency should _always_ be pinned, prefix the version with an `=` router-bridge = "=0.6.4+v2.9.3" rust-embed = { version = "8.4.0", features = ["include-exclude"] } rustls = "0.21.12" rustls-native-certs = "0.6.3" rustls-pemfile = "1.0.4" schemars.workspace = true shellexpand = "3.1.0" sha2 = "0.10.8" semver = "1.0.23" serde.workspace = true serde_derive_default = "0.1" serde_json_bytes.workspace = true serde_json.workspace = true serde_urlencoded = "0.7.1" serde_yaml = "0.8.26" static_assertions = "1.1.0" strum_macros = "0.26.0" sys-info = "0.9.1" sysinfo = { version = "0.32.0", features = ["windows"] } thiserror = "1.0.61" tokio.workspace = true tokio-stream = { version = "0.1.15", features = ["sync", "net"] } tokio-util = { version = "0.7.11", features = ["net", "codec", "time"] } tonic = { version = "0.9.2", features = [ "transport", "tls", "tls-roots", "gzip", ] } tower.workspace = true tower-http = { version = "0.4.0", features = [ "add-extension", "trace", "cors", "compression-br", "compression-deflate", "compression-gzip", "decompression-br", "decompression-deflate", "decompression-gzip", "timeout", ] } tower-service = "0.3.2" tracing = "0.1.40" tracing-core = "0.1.32" tracing-futures = { version = "0.2.5", features = ["futures-03"] } tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] } url = { version = "2.5.4", features = ["serde"] } urlencoding = "2.1.3" uuid = { version = "1.9.1", features = ["serde", "v4"] } yaml-rust = "0.4.5" wiremock = "0.5.22" wsl = "0.1.0" tokio-tungstenite = { version = "0.20.1", features = [ "rustls-tls-native-roots", ] } tokio-rustls = "0.24.1" hickory-resolver = "0.24.1" http-serde = "1.1.3" hmac = "0.12.1" parking_lot = { version = "0.12.3", features = ["serde"] } memchr = "2.7.4" brotli = "3.5.0" zstd = "0.13.1" zstd-safe = "7.1.0" # note: AWS dependencies should always use the same version aws-sigv4 = "1.1.6" aws-credential-types = "1.1.6" aws-config = "1.1.6" aws-types = "1.1.6" aws-smithy-runtime-api = { version = "1.1.6", features = ["client"] } aws-sdk-sso = "=1.39.0" # TODO: unpin when on Rust 1.78+ aws-sdk-ssooidc = "=1.40.0" # TODO: unpin when on Rust 1.78+ aws-sdk-sts = "=1.39.0" # TODO: unpin when on Rust 1.78+ sha1.workspace = true tracing-serde = "0.1.3" time = { version = "0.3.36", features = ["serde"] } similar = { version = "2.5.0", features = ["inline"] } console = "0.15.8" bytesize = { version = "1.3.0", features = ["serde"] } ahash = "0.8.11" itoa = "1.0.9" ryu = "1.0.15" apollo-environment-detector = "0.1.0" [target.'cfg(macos)'.dependencies] uname = "0.1.1" [target.'cfg(unix)'.dependencies] uname = "0.1.1" hyperlocal = { version = "0.8.0", default-features = false, features = [ "client", ] } [target.'cfg(target_os = "linux")'.dependencies] tikv-jemallocator = "0.6.0" [dev-dependencies] axum = { version = "0.6.20", features = [ "headers", "json", "original-uri", "ws", ] } ecdsa = { version = "0.16.9", features = ["signing", "pem", "pkcs8"] } fred = { version = "7.1.2", features = ["enable-rustls", "mocks"] } futures-test = "0.3.30" insta.workspace = true maplit = "1.0.2" memchr = { version = "2.7.4", default-features = false } mockall = "0.13.0" num-traits = "0.2.19" once_cell.workspace = true opentelemetry-stdout = { version = "0.1.0", features = ["trace"] } opentelemetry = { version = "0.20.0", features = ["testing"] } opentelemetry-proto = { version = "0.5.0", features = [ "metrics", "trace", "gen-tonic-messages", "with-serde", ] } opentelemetry-datadog = { version = "0.8.0", features = ["reqwest-client"] } p256 = "0.13.2" rand_core = "0.6.4" reqwest = { version = "0.11.0", default-features = false, features = [ "json", "multipart", "stream", ] } rhai = { version = "1.17.1", features = [ "sync", "serde", "internals", "testing-environ", ] } serial_test = { version = "3.1.1" } tempfile.workspace = true test-log = { version = "0.2.16", default-features = false, features = [ "trace", ] } basic-toml = "0.1.9" tower-test = "0.4.0" # See note above in this file about `^tracing` packages which also applies to # these dev dependencies. tracing-subscriber = { version = "0.3.18", default-features = false, features = [ "env-filter", "fmt", ] } tracing-opentelemetry = "0.21.0" tracing-test = "0.2.5" walkdir = "2.5.0" wiremock = "0.5.22" libtest-mimic = "0.7.3" [target.'cfg(target_os = "linux")'.dev-dependencies] rstack = { version = "0.3.3", features = ["dw"], default-features = false } [target.'cfg(unix)'.dev-dependencies] hyperlocal = { version = "0.8.0", default-features = false, features = [ "client", "server", ] } [build-dependencies] tonic-build = "0.9.2" basic-toml = "0.1.9" serde_json.workspace = true [package.metadata.cargo-machete] ignored = [ # Pinned to versions pre-MSRV bump. Remove when we update our rust-toolchain. "rowan", "aws-sdk-sso", "aws-sdk-ssooidc", "aws-sdk-sts", ] [[test]] name = "integration_tests" path = "tests/integration_tests.rs" [[test]] name = "samples" path = "tests/samples_tests.rs" harness = false [[bench]] name = "huge_requests" harness = false [[bench]] name = "deeply_nested" harness = false [[example]] name = "planner"