👋 We're getting closer to our release candidate stages so there are far less breaking changes to the API in this version, rather changes to configuration. We'll have a bit more in the next release, but nothing as bad as the bumps from 0.15.x, through 0.16.0 and on to v1.0.0-alpha.0
❗ BREAKING ❗
Preserve plugin response Vary
headers (PR #1660)
It is now possible to set a Vary
header in a client response from a plugin.
Note: This is a breaking change because the prior behaviour provided three default
Vary
headers and we've had to drop those to enable this change. If, after all plugin processing, there is noVary
header, the router will add one with a value of "origin
", as is best-practice for cache control headers with CORS.
Fix the supported defer specification version to 20220824
(PR #1652)
Since the router will ship before the @defer
specification is done, we add a parameter to the Accept
and Content-Type
headers to indicate which specification version is accepted.
The specification is fixed to graphql/graphql-spec@01d7b98
The router will now return a response with the status code 406 Not Acceptable
if the Accept
header does not match.
Change default enablement and promote experimental_defer_support
to preview_defer_support
(PR #1673)
Following up on a tremendous amount of work tracked in #80 - which brought various stages of @defer
support to the Router - this changes our designation of its status from "Experimental" to "Preview". It's worth noting that the @defer
specification has just graduated to "Stage 2 (Draft)" mode in the GraphQL Working Group, so changes may still be expected and there are two stages ahead. To help things progress:
-
We've lifted the previous requirement that users opt into defer support by setting
experimental_defer_support: true
in theserver
section of their configuration. It is now on by default. -
The option is now called
preview_defer_support
and it can be set tofalse
to specifically opt out of it existing at all. This might be desired if you would prefer that it not even show up in introspection or be possible to use even if a client requests it. -
Using
@defer
support requires clients set the appropriate HTTPaccept
header to use it. This puts the burden of understanding the risks of an early-preview on the clients who will need to consume the Router's responses. This is particularly important for clients who have long-lived support requirements (like native mobile apps).To see which headers are required, see #1648.
🚀 Features
Return an error when nullifying a non-null field (Issue #1304)
Nullability rules may remove parts of the response without indicating why. Error messages now indicate which part of the response triggered nullability rules.
router now provides TraceId (PR #1663)
If you need a reliable way to link together the various stages of pipeline processing, you can now use
apollo_router::tracer::TraceId::new()
🐛 Fixes
Docker images: Use absolute path for ENTRYPOINT
(PR #1684)
This restores the absolute path in ENTRYPOINT
in our Dockerfile
s (and published images) to allow users to change their working directory without consequence (and without needing to change it back to /dist
or override the entrypoint
).
Update our helm documentation to illustrate how to use our registry (#1643)
Updated documentation for helm charts to point to Apollo OCI registry.
Update router-bridge to query-planner
v2.1.1 (PR #1650 PR #1672)
The 2.1.0 release of the query planner comes with fixes to fragment interpretation and reduced memory usage.
The 2.1.1 release of the query planner fixes an issue with the @defer
directive's if
argument being ignored.
Do not nullify the entire query if the root operation is not present (PR #1674)
If a root field was not returned by the subgraph (e.g., when there's an error) the entire data object should not be nullified. Instead, the root field that should be null (unless it is non nullable).
Propagate graphql response regardless of the subgraph HTTP status code. (#1664)
Subgraph service calls no longer return an error when the received HTTP status code isn't 200. The GraphQL specification does not specify HTTP status code behavior since the GraphQL specification is transport agnostic.
This commit removes our HTTP status code check in the subgraph_service
.
By @o0Ignition0o in #1664
🛠 Maintenance
Remove cache layer (PR #1647)
ServiceBuilderExt::cache
was removed in v0.16.0. The unused CacheLayer
has now also been removed.
Refactor SupergraphService
(PR #1615)
The SupergraphService
code became too complex, so much that rustfmt
could not modify it anymore.
This breaks up the code in more manageable functions.
Conditionally use HorizontalPodAutoscaler
api version autoscaling/v2
(PR #1635)
The helm chart HorizontalPodAutoscaler
resource now will use API version autoscaling/v2
on Kubernetes hosts greater than 1.23 when the version is available. Fallback to version autoscaling/v2beta1
will still be utilised when this version is unavailable
By @damienpontifex in #1635