chore(deps): update dependency apollographql/router to v1.51.0 #1988
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.
This PR contains the following updates:
v1.50.0
->v1.51.0
Release Notes
apollographql/router (apollographql/router)
v1.51.0
Compare Source
🚀 Features
Support conditional coprocessor execution per stage of request lifecycle (PR #5557)
The router now supports conditional execution of the coprocessor for each stage of the request lifecycle (except for the
Execution
stage).To configure, define conditions for a specific stage by using selectors based on headers or context entries. For example, based on a supergraph response you can configure the coprocessor not to execute for any subscription:
To learn more, see the documentation about coprocessor conditions.
By @bnjjj in https://github.com/apollographql/router/pull/5557
Add option to deactivate introspection response caching (PR #5583)
The router now supports an option to deactivate introspection response caching. Because the router caches responses as introspection happens in the query planner, cached introspection responses may consume too much of the distributed cache or fill it up. Setting this option prevents introspection responses from filling up the router's distributed cache.
To deactivate introspection caching, set
supergraph.query_planning.legacy_introspection_caching
tofalse
:By @Geal in https://github.com/apollographql/router/pull/5583
Add 'subgraph_on_graphql_error' selector for subgraph (PR #5622)
The router now supports the
subgraph_on_graphql_error
selector for the subgraph service, which it already supported for the router and supergraph services. Subgraph service support enables easier detection of GraphQL errors in response bodies of subgraph requests.An example configuration with
subgraph_on_graphql_error
configured:By @bnjjj in https://github.com/apollographql/router/pull/5622
🐛 Fixes
Add
response_context
in event selector forevent_*
instruments (PR #5565)The router now supports creating custom instruments with a value set to
event_*
and using both a condition executed on an event and theresponse_context
selector in attributes. Previous releases didn't support theresponse_context
selector in attributes.An example configuration:
By @bnjjj in https://github.com/apollographql/router/pull/5565
Provide valid trace IDs for unsampled traces in Rhai scripts (PR #5606)
The
traceid()
function in a Rhai script for the router now returns a valid trace ID for all traces.Previously,
traceid()
didn't return a trace ID if the trace wasn't selected for sampling.By @bnjjj in https://github.com/apollographql/router/pull/5606
Allow query batching and entity caching to work together (PR #5598)
The router now supports entity caching and subgraph batching to run simultaneously. Specifically, this change updates entity caching to ignore a subgraph request if the request is part of a batch.
By @garypen in https://github.com/apollographql/router/pull/5598
Gracefully handle subgraph response with
-1
values inside error locations (PR #5633)This router now gracefully handles responses that contain invalid "
-1
" positional values for error locations in queries by ignoring those invalid locations.This change resolves the problem of GraphQL Java and GraphQL Kotlin using
{ "line": -1, "column": -1 }
values if they can't determine an error's location in a query, but the GraphQL specification requires bothline
andcolumn
to be positive numbers.As an example, a subgraph can respond with invalid error locations:
With this change, the router returns a response that ignores the invalid locations:
By @IvanGoncharov in https://github.com/apollographql/router/pull/5633
Return request timeout and rate limited error responses as structured errors (PR #5578)
The router now returns request timeout errors (
408 Request Timeout
) and request rate limited errors (429 Too Many Requests
) as structured GraphQL errors (for example,{"errors": [...]}
). Previously, the router returned these as plaintext errors to clients.Both types of errors are properly tracked in telemetry, including the
apollo_router_graphql_error_total
metric.By @IvanGoncharov in https://github.com/apollographql/router/pull/5578
Fix span names and resource mapping for Datadog trace exporter (Issue #5282)
The router now uses static span names by default. This change fixes the user experience of the Datadog trace exporter when sending traces with Datadog native configuration.
The router has two ways of sending traces to Datadog:
otlp
in YAML configuration, and it is not impacted by this fix.datadog:
key in YAML configuration.This change fixes a bug in the latter approach that broke some Datadog experiences, such as the "Resources" section of the Datadog APM Service Catalog page.
We now use static span names by default, with resource mappings providing additional context when requested, which enables the desired behavior which was not possible before.
If for some reason you wish to maintain the existing behavior, you must either update your spans and resource mappings, or keep your spans and instead configure the router to use dynamic span names and disable resource mapping.
Enabling resource mapping and fixed span names is configured by the
enable_span_mapping
andfixed_span_names
options:With
enable_span_mapping
set totrue
(now default), the following resource mappings are applied:request
http.route
router
http.route
supergraph
graphql.operation.name
query_planning
graphql.operation.name
subgraph
subgraph.name
subgraph_request
graphql.operation.name
http_request
http.route
You can override the default resource mappings by specifying the
resource_mapping
configuration:To learn more, see the Datadog trace exporter documentation.
By @bnjjj and @bryncooke in https://github.com/apollographql/router/pull/5386
📚 Documentation
Update documentation for
ignore_other_prefixes
(PR #5592)Update JWT authentication documentation to clarify the behavior of the
ignore_other_prefixes
configuration option.By @andrewmcgivery in https://github.com/apollographql/router/pull/5592
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.