github apollographql/router v0.11.0

latest releases: v13.4.56, v13.4.56-rc.0, v12.3.456...
23 months ago

❗ BREAKING ❗

Relax plugin api mutability PR #1340 PR #1289

the Plugin::*_service() methods were taking a &mut self as argument, but since
they work like a tower Layer, they can use &self instead. This change
then allows us to move from Buffer to service factories for the query
planner, execution and subgraph services.

Services are now created on the fly at session creation, so if any state must be shared
between executions, it should be stored in an Arc<Mutex<_>> in the plugin and cloned
into the new service in the Plugin::*_service() methods
.

By @Geal in #1340 #1289

🚀 Features

Add support to add custom resources on metrics. PR #1354

Resources are almost like attributes but more global. They are directly configured on the metrics exporter which means you'll always have these resources on each of your metrics. This functionality can be used to, for example,
apply a service.name to metrics to make them easier to find in larger infrastructure, as demonstrated here:

telemetry:
  metrics:
    common:
      resources:
        # Set the service name to easily find metrics related to the apollo-router in your metrics dashboards
        service.name: "apollo-router"

By @bnjjj in #1354

🐛 Fixes

Fix fragment on interface without typename PR #1371

When the subgraph doesn't return the __typename and the type condition of a fragment is an interface, we should return the values if the entity implements the interface

By @bnjjj in #1371

Fix detection of an introspection query PR #1370

A query that only contains __typename at the root will now special-cased as merely an introspection query and will bypass more complex query-planner execution (its value will just be Query).

By @bnjjj in #1370

Accept nullable list as input PR #1363

Do not throw a validation error when you give null for an input variable of type [Int!].

By @bnjjj in #1363

🛠 Maintenance

Replace Buffers of tower services with service factories (PR #1289 PR #1355)

Tower services should be used by creating a new service instance for each new session
instead of going through a Buffer.

By @Geal in #1289 #1355

Execute the query plan's first response directly (PR #1357)

The query plan was previously executed in a spawned task to prepare for the @defer implementation, but we can actually
generate the first response right inside the same future.

By @Geal in #1357

Remove deprecated failure crate from the dependency tree PR #1373

This should fix automated reports about GHSA-jq66-xh47-j9f3.

By @yanns in #1373

Render embedded Sandbox instead of landing page (PR #1369)

Open the router URL in a browser and start querying the router from the Apollo Sandbox.

By @mayakoneval in #1369

📚 Documentation

Various documentation edits (PR #1329)

By @StephenBarlow in #1329

Don't miss a new router release

NewReleases is sending notifications on new releases.