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.
🐛 Fixes
Fix JWT metrics discrepancy (PR #7258)
This fixes the
apollo.router.operations.authentication.jwt
counter metric to behave as documented: emitted for every request that uses JWT, with theauthentication.jwt.failed
attribute set to true or false for failed or successful authentication.Previously, it was only used for failed authentication.
The attribute-less and accidentally-differently-named
apollo.router.operations.jwt
counter was and is only emitted for successful authentication, but is deprecated now.By @SimonSapin in #7258
Fix Redis connection leak (PR #7319)
The router performs a 'hot reload' whenever it detects a schema update. During this reload, it effectively instantiates a new internal router, warms it up (optional), redirects all traffic to this new router, and drops the old internal router.
This change fixes a bug in that drop process where the Redis connections are never told to terminate, even though the Redis client pool is dropped. This leads to an ever-increasing number of inactive Redis connections, which eats up memory.
It also adds a new up-down counter metric,
apollo.router.cache.redis.connections
, to track the number of open Redis connections. This metric includes akind
label to discriminate between different Redis connection pools, which mirrors thekind
label on other cache metrics (ieapollo.router.cache.hit.time
).By @carodewig in #7319
Fix Parsing of Coprocessor GraphQL Responses (PR #7141)
Previously Router ignored
data: null
property inside GraphQL response returned by coprocessor.According to GraphQL Spectification:
That means if coprocessor returned valid execution error, for example:
Router violated above restriction from GraphQL Specification by returning following response to client:
This fix ensures full compliance with the GraphQL specification by preserving the complete structure of error responses from coprocessors.
Contributed by @IvanGoncharov in #7141
Avoid fractional decimals when generating
apollo.router.operations.batching.size
metrics for GraphQL request batch sizes (PR #7306)Correct the calculation of the
apollo.router.operations.batching.size
metric to reflect accurate batch sizes rather than occasionally returning fractional numbers.By @bnjjj in #7306
📃 Configuration
Add configurable server header read timeout (PR #7262)
This change exposes the server's header read timeout as the
server.http.header_read_timeout
configuration option.By default, the
server.http.header_read_timeout
is set to previously hard-coded 10 seconds. A longer timeout can be configured using theserver.http.header_read_timeout
option.By @gwardwell in #7262
🛠 Maintenance
Reject
@skip
/@include
on subscription root fields in validation (PR #7338)This implements a GraphQL spec RFC, rejecting subscriptions in validation that can be invalid during execution.
By @goto-bus-stop in #7338