github apollographql/router v1.56.0

latest release: v2.0.0-preview.0
16 hours ago

Important

If you have enabled Distributed query plan caching, this release changes the hashing algorithm used for the cache keys. On account of this, you should anticipate additional cache regeneration cost when updating between these versions while the new hashing algorithm comes into service.

🚀 Features

Native query planner is now in public preview

The native query planner is now in public preview. You can configure the experimental_query_planner_mode option in the router configuration YAML to change the mode of the native query planner. The following modes are available:

  • new: Enable only the new Rust-native query planner in the hot-path of query execution.
  • legacy: Enable only the legacy JavaScript query planner in the hot-path of query execution.
  • both_best_effort: Enables both the new and legacy query planners. They are configured in a comparison-based mode of operation with the legacy planner in the hot-path and the and the new planner in the cold-path. Comparisons are made between the two plans on a sampled basis and metrics are available to analyze the differences in aggregate.

Support loading Apollo key from file (PR #5917)

You can now specific the location to a file containing the Apollo key that's used by Apollo Uplink and usage reporting. The router now supports both the --apollo-key-path CLI argument and the APOLLO_KEY_PATH environment variable for passing the file containing your Apollo key.

Previously, the router supported only the APOLLO_KEY environment variable to provide the key. The new CLI argument and environment variable help users who prefer not to pass sensitive keys through environment variables.

Note: This feature is unavailable for Windows.

By @lleadbet in #5917

🐛 Fixes

Prevent sending internal apollo_private.* attributes to Jaeger collector (PR #6033)

When using the router's Jaeger collector to send traces, you will no longer receive span attributes with the apollo_private. prefix. Those attributes were incorrectly sent, as that prefix is reserved for internal attributes.

By @bnjjj in #6033

Fix displaying custom event attributes on subscription events (PR #6033)

The router now properly displays custom event attributes that are set with selectors at the supergraph level.

An example configuration:

telemetry:
  instrumentation:
    events:
      supergraph:
        supergraph.event:
          message: supergraph event
          on: event_response # on every supergraph event (like subscription event for example)
          level: info
          attributes:
            test:
              static: foo
            response.data:
              response_data: $ # Display all the response data payload
            response.errors:
              response_errors: $ # Display all the response errors payload

By @bnjjj in #6033

Update to Federation v2.9.2 (PR #6069)

This release updates to Federation v2.9.2, with a small fix to the internal __typename optimization and a fix to prevent argument name collisions in the @context/@fromContext directives.

By @dariuszkuc in #6069

📃 Configuration

Add metrics for Rust vs. Deno configuration values (PR #6056)

To help track the migration from JavaScript (Deno) to native Rust implementations, the router now reports the values of the following configuration options to Apollo:

  • apollo.router.config.experimental_query_planner_mode
  • apollo.router.config.experimental_introspection_mode

By @goto-bus-stop in #6056

Don't miss a new router release

NewReleases is sending notifications on new releases.