🐛 Fixes
Update to Federation v2.1.4 (PR #1994)
In addition to general Federation bug-fixes, this update should resolve a case (seen in Issue #1962) where a @defer
directives which had been previously present in a Supergraph were causing a startup failure in the Router when we were trying to generate an API schema in the Router with @defer
.
Assume Accept: application/json
when no Accept
header is present (Issue #1995)
the Accept
header means */*
when it is absent.
Fix OpenTelemetry OTLP gRPC (Issue #1976)
OpenTelemetry (OTLP) gRPC failures involving TLS errors have been resolved against external APMs: including Datadog, NewRelic and Honeycomb.io.
By @BrynCooke in https://github.com/apollographql/router/pull/#1977
Prefix the Prometheus metrics with apollo_router_
(Issue #1915)
Correctly prefix Prometheus metrics with the apollo_router
prefix, per convention.
- http_requests_error_total{message="cannot contact the subgraph",service_name="apollo-router",subgraph="my_subgraph_name_error",subgraph_error_extended_type="SubrequestHttpError"} 1
+ apollo_router_http_requests_error_total{message="cannot contact the subgraph",service_name="apollo-router",subgraph="my_subgraph_name_error",subgraph_error_extended_type="SubrequestHttpError"} 1
Fix --hot-reload
in Kubernetes and Docker (Issue #1476)
The --hot-reload
flag now chooses a file event notification mechanism at runtime. The exact mechanism is determined by the notify
crate.
Fix a coercion rule that failed to validate 64-bit integers (PR #1951)
Queries that passed 64-bit integers for Float
input variables would were failing to validate despite being valid.
By @o0Ignition0o in #1951
Prometheus: make sure apollo_router_http_requests_error_total
and apollo_router_http_requests_total
are incremented. (PR #1953)
This affected two different metrics differently:
-
The
apollo_router_http_requests_error_total
metric only incremented for requests that would be anINTERNAL_SERVER_ERROR
in the Router (the service stack returning aBoxError
). This meant that GraphQL validation errors were not increment this counter. -
The
apollo_router_http_requests_total
metric would only increment for successful requests despite the fact that the Prometheus documentation suggests this should be incremented regardless of whether the request succeeded or not.
This PR makes sure we always increment apollo_router_http_requests_total
and we increment apollo_router_http_requests_error_total
when the status code is 4xx or 5xx.
By @o0Ignition0o in #1953
Set no_delay
and keepalive
on subgraph requests Issue #1905)
This re-introduces these parameters which were incorrectly removed in a previous pull request.
🛠 Maintenance
Improve the stability of some flaky tests (PR #1972)
The trace and rate limiting tests have been sporadically failing in our CI environment. The root cause was a race-condition in the tests so the tests have been made more resilient to reduce the number of failures.
By @garypen in #1972 and #1974
Update docker-compose
and Dockerfile
s now that the submodules have been removed (PR #1950)
We recently removed Git submodules from this repository but we didn't update various docker-compose.yml
files.
This PR adds new Dockerfile
s and updates existing docker-compose.yml
files so we can run integration tests (and the fuzzer) without needing to git clone
and set up the Federation and federation-demo
repositories.
By @o0Ignition0o in #1950
Fix logic around Accept
headers and multipart responses (PR #1923)
If the Accept
header contained multipart/mixed
, even with other alternatives like application/json
,
a query with a single response was still sent as multipart, which made Apollo Studio Explorer fail on the initial introspection query.
This changes the logic so that:
- If the client has indicated an
accept
ofapplication/json
or*/*
and there is a single response, it will be delivered ascontent-type: application/json
. - If there are multiple responses or the client only accepts
multipart/mixed
, we will sendcontent-type: multipart/mixed
response. This will occur even if there is only one response. - Otherwise, we will return an HTTP status code of
406 Not Acceptable
.
@defer
: duplicated errors across incremental items (Issue #1834, Issue #1818)
If a deferred response contains incremental responses, the errors should be dispatched in each increment according to the error's path.
Our Docker images are now linked to our GitHub repository per OCI-standards (PR #1958)
The org.opencontainers.image.source
annotation has been added to our Dockerfile
s and published Docker image in order to map the published image to our GitHub repository.
By @ndthanhdev in #1958