github apollographql/router v1.8.0

latest releases: v1.56.0-rc.0, v1.52.2-rc.0, v1.55.1-rc.1...
20 months ago

๐Ÿ“ƒ Configuration

Configuration changes will be automatically migrated on load. However, you should update your source configuration files as these will become breaking changes in a future major release.

Defer support graduates fromย preview (Issue #2368)

We're pleased to announce that @defer support has been promoted to general availability in accordance with our product launch stages.

Defer is enabled by default in the Router, however if you had previously explicitly disabled defer support via configuration then you will need to update your configuration accordingly:

Before:

supergraph:
  preview_defer_support: true

After:

supergraph:
  defer_support: true

By @BrynCooke in #2378

Remove timeout from OTLP exporter (Issue #2337)

A duplicative timeout property has been removed from the telemetry.tracing.otlp object since the batch_processor configuration already contained a timeout property. The Router will tolerate both options for now and this will be a breaking change in a future major release. Please update your configuration accordingly to reduce future work.

Before:

telemetry:
  tracing:
    otlp:
      timeout: 5s

After:

telemetry:
  tracing:
    otlp:
      batch_processor:
        timeout: 5s

By @BrynCooke in #2338

๐Ÿš€ Features

The Helm chart has graduated from prerelease to general availability (PR #2380)

As part of this release, we have promoted the Helm chart from its prerelease "release-candidate" stage to a "stable" version number. We have chosen to match the version of the Helm chart to the Router version, which is very agreeable with our automated Router releasing pipeline. This means the first stable version of the Helm chart will be 1.8.0 which will pair with Router 1.8.0 and subsequent versions will be in lock-step.

By @abernix in #2380

Emit hit/miss metrics for APQ, Query Planning and Introspection caches (Issue #1985)

Added metrics for caching.
Each cache metric contains a kind attribute to indicate the kind of cache (query planner, apq, introspection)
and a storage attribute to indicate the backing storage e.g memory/disk.

The following buckets are exposed:
apollo_router_cache_hit_count - cache hits.

apollo_router_cache_miss_count - cache misses.

apollo_router_cache_hit_time - cache hit duration.

apollo_router_cache_miss_time - cache miss duration.

Example

# TYPE apollo_router_cache_hit_count counter
apollo_router_cache_hit_count{kind="query planner",new_test="my_version",service_name="apollo-router",storage="memory"} 2
# TYPE apollo_router_cache_hit_time histogram
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.001"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.005"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.015"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.05"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.1"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.2"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.3"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.4"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.5"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="1"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="5"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="10"} 2
apollo_router_cache_hit_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="+Inf"} 2
apollo_router_cache_hit_time_sum{kind="query planner",service_name="apollo-router",storage="memory"} 0.000236782
apollo_router_cache_hit_time_count{kind="query planner",service_name="apollo-router",storage="memory"} 2
# HELP apollo_router_cache_miss_count apollo_router_cache_miss_count
# TYPE apollo_router_cache_miss_count counter
apollo_router_cache_miss_count{kind="query planner",service_name="apollo-router",storage="memory"} 1
# HELP apollo_router_cache_miss_time apollo_router_cache_miss_time
# TYPE apollo_router_cache_miss_time histogram
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.001"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.005"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.015"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.05"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.1"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.2"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.3"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.4"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="0.5"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="1"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="5"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="10"} 1
apollo_router_cache_miss_time_bucket{kind="query planner",service_name="apollo-router",storage="memory",le="+Inf"} 1
apollo_router_cache_miss_time_sum{kind="query planner",service_name="apollo-router",storage="memory"} 0.000186783
apollo_router_cache_miss_time_count{kind="query planner",service_name="apollo-router",storage="memory"} 1

By @bnjjj in #2327

Add support for single instance Redis (Issue #2300)

Experimental caching via Redis now works with single Redis instances when configured with a single URL.

By @bnjjj in #2310

Support TLS connections to single instance Redis (Issue #2332)

TLS connections are now supported when connecting to single Redis instances. It is useful for connecting to hosted Redis providers where TLS is mandatory.
TLS connections for clusters are not supported yet, see Issue #2332 for updates.

By @Geal in #2336

๐Ÿ› Fixes

Correctly handle aliased __typename fields (Issue #2330)

If you aliased a __typename like in this example query:

{
  myproducts: products {
       total
       __typename
  }
  _0___typename: __typename
}

Before this fix, _0___typename was set to null. Thanks to this fix it now properly returns Query.

By @bnjjj in #2357

subgraph_request span is now set as the parent of traces coming from subgraphs (Issue #2344)

Before this fix, the context injected in headers to subgraphs was wrong and not attached to the correct parent span id, causing it to appear disconnected when rendering the trace tree.

By @bnjjj in #2345

๐Ÿ›  Maintenance

Simplify telemetry config code (Issue #2337)

This brings the telemetry plugin configuration closer to standards recommended in the YAML design guidance.

By @BrynCooke in #2338

Upgrade the clap version in scaffold templates (Issue #2165)

Upgrade clap dependency version to a version supporting the generation of scaffolded plugins via xtask.

By @bnjjj in #2343

Upgrade axum to 0.6.1 (PR #2303)

For more details about the new axum release, please read the project's change log

By @bnjjj in #2303

Set the HTTP response content-type as application/json when returning GraphQL errors (Issue #2320)

When throwing a INVALID_GRAPHQL_REQUEST error, it now specifies the expected content-type header rather than omitting the header as it was previously.

By @bnjjj in #2321

Move APQ and EnsureQueryPresence layers to the new router_service (PR #2296)

Moving APQ from the axum level to the supergraph_service reintroduced a Buffer to the service pipeline.
To avoid this, now the APQ and EnsureQueryPresence layers are part of the newly introduced router_service, removing that Buffer.

By @Geal in #2296

Refactor YAML validation error reports (Issue #2180)

YAML configuration file validation prints a report of the errors it encountered, but that report was missing some details and occasionally had its diagnostics cursor pointing at the wrong character/line. It now points at the correct place more reliably.

By @Geal in #2347

Don't miss a new router release

NewReleases is sending notifications on new releases.