Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Features
Redis key namespace (Issue #4247)
This implements key namespacing in redis caching. The namespace, if provided, will be added as a prefix to the key:
namespace:key
.By @Geal in #4458
Promote HTTP request size limit from experimental to general availability (PR #4442)
By default Apollo Router limits the size of the HTTP request body it will read from the network to 2 MB. In this version, the YAML configuration to change the limit is promoted from experimental to general availability.
For more information about launch stages, please see the documentation here: https://www.apollographql.com/docs/resources/product-launch-stages/
Before increasing this limit significantly consider testing performance in an environment similar to your production,
especially if some clients are untrusted. Many concurrent large requests could cause the Router to run out of memory.
Previous configuration will warn but still work:
The warning can be fixed by removing the
experimental_
prefix:By @SimonSapin in #4442
Add options to set username and password separately for Redis (Issue #4346)
Example of configuration:
By @bnjjj in #4453
🐛 Fixes
Fix the Datadog default tracing exporter URL (Issue #4415)
The default URL for the Datadog exporter was incorrectly set to
http://localhost:8126/v0.4/traces
which caused issues for users that were running different agent versions.This is now fixed and matches the exporter URL of
http://127.0.0.1:8126
.By @BrynCooke in #4444
Use the right conventions for batching metrics (PR #4424)
Rename
apollo_router.operations.batching
toapollo.router.operations.batching
because it doesn't follow our conventions withapollo.router.
prefix.By @bnjjj in #4424
Fix format_response for statically skipped root selection set (Issue #4397)
If in your GraphQL operation you have a root selection set skipped by
@skip
or@include
directive, before this fix the results you got if you hardcoded the value of the parameter in@skip
directive like this for example:or if you used a variable like this:
you received different response. Now it both answers:
{ "data": {}}
By @bnjjj in #4466
Improve JWKS parse error handling (Issue #4463)
When parsing a JWKS the Router should ignore any JWKs that fail to parse, rather than failing the entire JWKS parse.
This can happen when the JWK is malformed, or when a JWK uses an unknown algorithm. When this happens a warning will be output to the logs, for example:
Log messages have the following attributes:
alg
The JWK algorithm if known or<unknown>
index
The index of the JWK within the JWKS.url
The URL of the JWKS that had the issue.By @BrynCooke in #4465
update router-bridge to v0.5.14+v2.6.3 (PR #4468)
This federation update contains query planning fixes for:
@interfaceObject
@requires
By @Geal in #4468
Set log level to
info
by default for the entire application (PR #4451)By default the log level of the application if
RUST_LOG
is not set isinfo
and if you provide--log
orAPOLLO_RUST_LOG
value then it overrides the defaultinfo
log level withapollo_router=...
because it only impacts theapollo_router
crate, not external custom plugin and so one.By doing this fix, by default if you have a custom plugin with info logs or metrics you won't have to enforce
RUST_LOG=info
everytime, it will work as expected.By @bnjjj in #4451
fix: build entity representations with inline fragments correctly (PR #4441)
This uses a more flexible abstract type / concrete type check when applying a selection set to an entity reference before it's used in a fetch node. Previous to this change, we would drop data from the reference when it selected using an inline fragment (e.g.
@requires(fields: "... on Foo { a } ... on Bar { b }")
).By @lennyburdette in #4441
Improve logging for JWKS download failures (Issue #4448)
To enable users to debug JWKS download and parse failures more easily, we've added more detailed logging to the router. The router now logs the following information when a JWKS download or parse fails:
Enabling debug logs via
APOLLO_LOG=debug
or--logs DEBUG
will show the full JWKS content being parsed:By @BrynCooke in #4449
make OperationKind public (Issue #4410)
OperationKind
was already used in a public field but the type itself was still private.By @Geal in #4489
🛠 Maintenance
Pre-built binaries are only available for Apple Silicon (Issue #3902)
Prior to this release, macOS binaries were produced on Intel build machines in our CI pipeline. The binaries produced would also work on Apple Silicon (M1, etc.. chips) through the functionality provided by Rosetta2.
Our CI provider has announced the deprecation of the macOS Intel build machines and we are updating our build pipeline to use the new Apple Silicon based machines.
This will have the following effects:
We have raised an issue that describes options for Intel based macOS users. Please let us know in that issue if the alternatives we suggest (e.g., Docker, source build) don't work for you so we can discuss alternatives.
By @garypen in #4484