github apollographql/router v0.9.0

latest releases: v1.55.0-rc.1, v1.55.0-rc.0, v2.0.0-alpha.6...
2 years ago

🎉 The Apollo Router has graduated from Preview to General Availability (GA)! 🎉

We're so grateful for all the feedback we've received from our early Router adopters and we're excited to bring the Router to our General Availability (GA) release.

We hope you continue to report your experiences and bugs to our team as we continue to move things forward. If you're having any problems adopting the Router or finding the right migration path from Apollo Gateway which isn't already covered in our migration guide, please open an issue or discussion on this repository!

❗ BREAKING ❗

Remove the agent endpoint configuration for Zipkin PR #1025

Zipkin only supports endpoint URL configuration rather than endpoint within collector, this means Zipkin configuration changes from:

telemetry:
  tracing:
    trace_config:
      service_name: router
    zipkin:
      collector:
        endpoint: default

to:

telemetry:
  tracing:
    trace_config:
      service_name: router
    zipkin:
      endpoint: default

CSRF Protection is enabled by default PR #1006

A Cross-Site Request Forgery (CSRF) protection plugin is now enabled by default.

This means simple requests will be rejected from now on, since they represent security risks without the correct CSRF protections in place.

The plugin can be customized as explained in the CORS and CSRF example.

CORS default behavior update PR #1006

The CORS allow_headers default behavior has changed from its previous configuration.

The Router will now reflect the values received in the Access-Control-Request-Headers header, rather than only allowing Content-Type, apollographql-client-name and apollographql-client-version as it did previously.

This change loosens the CORS-related headers restrictions, so it shouldn't have any impact on your setup.

🚀 Features

CSRF Protection PR #1006

The router now embeds a CSRF protection plugin, which is enabled by default. Have a look at the CORS and CSRF example to learn how to customize it. Documentation will be updated soon!

Helm chart now supports prometheus metrics PR #1005

The router has supported exporting prometheus metrics for a while. This change updates our helm chart to enable router deployment prometheus metrics.

Configure by updating your values.yaml or by specifying the value on your helm install command line.

e.g.: helm install --set router.configuration.telemetry.metrics.prometheus.enabled=true <etc...>

Note: Prometheus metrics are not enabled by default in the helm chart.

Extend capabilities of rhai processing engine PR #1021

  • Rhai plugins can now interact more fully with responses, including body and header manipulation where available.
  • Closures are now supported for callback processing.
  • Subgraph services are now identified by name.

There is more documentation about how to use the various rhai interfaces to the Router and we now have six examples of rhai scripts (look for examples prefixed with rhai-) doing various request and response manipulations!

🐛 Fixes

Remove the requirement on jq in our install script PR #1034

We're now using cut command instead of jq which allows using our installer without installing jq first. (Don't get us wrong, we love jq, but not everyone has it installed!).

Configuration for Jaeger/Zipkin agent requires an URL instead of a socket address PR #1018

The router now supports URLs for a Jaeger or Zipkin agent allowing configuration as follows in this jaeger example:

telemetry:
  tracing:
    trace_config:
      service_name: router
    jaeger:
      agent:
        endpoint: jaeger:14268

Fix a panic in Zipkin telemetry configuration PR #1019

Using the reqwest blocking client feature was causing panicking due to an incompatible usage of an asynchronous runtime.

Improvements to Apollo Studio reporting PR #1020, PR #1037

This architectural change, which moves the location that we do aggregations internally in the Router, allows us to move towards full reporting functionality. It shouldn't affect most users.

Field usage reporting is now reported against the correct schema PR #1043

When using Managed Federation, we now report usage identified by the schema it was processed on, improving reporting in Apollo Studio.

Check that an object's __typename is part of the schema PR #1033

In case a subgraph returns an object with a __typename field referring to a type that is not in the API schema, as is the case when using the @inaccessible directive on object types, the requested object tree is now replaced with a null value in order to conform with the API schema. This improves our behavior with the recently launched Contracts feature from Apollo Studio.

🛠 Maintenance

OpenTracing examples PR #1015

We now have complete examples of OpenTracing usage with Datadog, Jaeger and Zipkin, that can be started with docker-compose.

📚 Documentation ( 📚 )

Add documentation for the endpoint configuration in server (PR #1000)

Documentation about setting a custom endpoint path for GraphQL queries has been added.

Also, we reached issue / pull-request number ONE THOUSAND! (💯0)

Don't miss a new router release

NewReleases is sending notifications on new releases.