✨ Features
-
Request lifecycle checkpoints (PR #558 and PR #580)
Checkpoints in the request pipeline now allow plugin authors (which includes us!) to check conditions during a request's lifecycle and circumvent further execution if desired.
Using
Step
return types within the checkpoint it's possible to influence what happens (including changing things like the HTTP status code, etc.). A caching layer, for example, could returnStep::Return(response)
if a cache "hit" occurred andStep::Continue(request)
(to allow normal processing to continue) in the event of a cache "miss".These can be either synchronous or asynchronous. To see examples, see:
-
Contracts support (PR #573)
The Apollo Router now supports Apollo Studio Contracts!
-
Add OpenTracing support (PR #548)
OpenTracing support has been added into the reporting plugin. You're now able to have span propagation (via headers) via two common formats supported by the
opentracing
crate:zipkin_b3
andjaeger
.
🐛 Fixes
-
Configuration no longer requires
router_url
(PR #553)When using Managed Federation or directly providing a Supergraph file, it is no longer necessary to provide a
routing_url
value. Instead, the values provided by the Supergraph or Studio will be used and therouting_url
can be used only to override specific URLs for specific subgraphs. -
Fix plugin ordering (PR #559)
Plugins need to execute in sequence of declaration except for certain "core" plugins (e.g., reporting) which must execute early in the plugin sequence to make sure they are in place as soon as possible in the Router lifecycle. This change now ensures that the reporting plugin executes first and that all other plugins are executed in the order of declaration in configuration.
-
Propagate Router operation lifecycle errors (PR #537)
Our recent extension rework was missing a key part: Error propagation and handling! This change makes sure errors that occurred during query planning and query execution will be displayed as GraphQL errors instead of an empty payload.