github apollographql/router v0.1.0-preview.7

latest releases: v1.46.0-rc.3, v1.46.0-rc.2, v1.46.0-rc.1...
2 years ago

❗ BREAKING ❗

Plugin utilities cleanup PR #819, PR #908

Utilities around creating Request and Response structures have been migrated to builders.

Migration:

  • plugin_utils::RouterRequest::builder()->RouterRequest::fake_builder()
  • plugin_utils::RouterResponse::builder()->RouterResponse::fake_builder()

In addition, the plugin_utils module has been removed. Mock service functionality has been migrated to plugin::utils::test.

Layer cleanup PR #950

Reusable layers have all been moved to apollo_router_core::layers. In particular the checkpoint_* layers have been moved from the plugins module.
async_checkpoint has been renamed to checkpoint_async for consistency with Tower.
Layers that were internal to our execution pipeline have been moved and made private to the crate.

Plugin API changes PR #855

Previously the Plugin trait has three lifecycle hooks: new, startup, and shutdown.

Startup and shutdown are problematic because:

  • Plugin construction happens in new and startup. This means creating in new and populating in startup.
  • Startup and shutdown has to be explained to the user.
  • Startup and shutdown ordering is delicate.

The lifecycle now looks like this:

  1. new
  2. activate
  3. drop

Users can migrate their plugins using the following:

  • Plugin#startup->Plugin#new
  • Plugin#shutdown->Drop#drop

In addition, the activate lifecycle hook is now not marked as deprecated, and users are free to use it.

🚀 Features

Add SpanKind and SpanStatusCode to follow the opentelemetry spec PR #925

Spans now contains otel.kind and otel.status_code attributes when needed to follow the opentelemtry spec .

Configurable client identification headers PR #850

The router uses the HTTP headers apollographql-client-name and apollographql-client-version to identify clients in Studio telemetry. Those headers can now be overriden in the configuration:

telemetry:
  apollo:
    # Header identifying the client name. defaults to apollographql-client-name
    client_name_header: <custom_client_header_name>
    # Header identifying the client version. defaults to apollographql-client-version
    client_version_header: <custom_version_header_name>

🐛 Fixes

Fields in the root selection set of a query are now correctly skipped and included PR #931

The @skip and @include directives are now executed for the fields in the root selection set.

Configuration errors on hot-reload are output PR #850

If a configuration file had errors on reload these were silently swallowed. These are now added to the logs.

Telemetry spans are no longer created for healthcheck requests PR #938

Telemetry spans where previously being created for the healthcheck requests which was creating noisy telemetry for users.

Dockerfile now allows overriding of CONFIGURATION_PATH PR #948

Previously CONFIGURATION_PATH could not be used to override the config location as it was being passed by command line arg.

Do not remove __typename from the aggregated response PR #919

If the client was explicitely requesting the __typename field, it was removed from the aggregated subgraph data, and so was not usable by fragment to check the type.

Follow the GraphQL spec about Response format PR #926

The response's data field can be null or absent depending on conventions that are now followed by the router.

🛠 Maintenance

Upgrade test-span to display more children spans in our snapshots PR #942

Previously in test-span before the fix introduced here we were filtering too aggressively. So if we wanted to snapshot all DEBUG level if we encountered a TRACE span which had DEBUG children then these children were not snapshotted. It's now fixed and it's more consistent with what we could have/see in jaeger.

Finalize migration from Warp to Axum PR #920

Adding more tests to be more confident to definitely delete the warp-server feature and get rid of warp

End to end integration tests for Jaeger PR #850

Jaeger tracing end to end test including client->router->subgraphs

Router tracing span cleanup PR #850

Spans generated by the Router are now aligned with plugin services.

Simplified CI for windows PR #850

All windows processes are spawned via xtask rather than a separate CircleCI stage.

Enable default feature in graphql_client PR #905

Removing the default feature can cause build issues in plugins.

Add client awareness headers to CORS allowed headers PR #917

The client awareness headers are now added by default to the list of CORS allowed headers, for easier integration of browser based applications. We also document how to override them and update the CORS configuration accordingly.

Remove unnecessary box in instrumentation layer PR #940

Minor simplification of code to remove boxing during instrumentation.

📚 Documentation

Enhanced rust docs (PR #819)

Many more rust docs have been added.

Federation version support page PR #896

Add Federation version support doc page detailing which versions of federation are compiled against versions of the router.

Improve readme for embedded Router PR #936

Add more details about pros and cons so that users know what they're letting themselves in for.

Document layers PR #950

Document the notable existing layers and add rust docs for custom layers including basic use cases.

Don't miss a new router release

NewReleases is sending notifications on new releases.