chore(deps): update dependency apollographql/router to v1.57.0 #2235
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.56.0
->v1.57.0
Release Notes
apollographql/router (apollographql/router)
v1.57.0
Compare Source
🚀 Features
Remove legacy schema introspection (PR #6139)
Schema introspection in the router now runs natively without JavaScript. We have high confidence that the new native implementation returns responses that match the previous Javascript implementation, based on differential testing: fuzzing arbitrary queries against a large schema, and testing a corpus of customer schemas against a comprehensive query.
Changes to the router's YAML configuration:
experimental_introspection_mode
key has been removed, with thenew
mode as the only behavior in this release.supergraph.query_planning.legacy_introspection_caching
key is removed, with the behavior in this release now similar to what wasfalse
: introspection responses are not part of the query plan cache but instead in a separate, small in-memory—only cache.When using the above deprecated configuration options, the router's automatic configuration migration will ensure that existing configuration continue to work until the next major version of the router. To simplify major upgrades, we recommend reviewing incremental updates to your YAML configuration by comparing the output of
./router config upgrade --config path/to/config.yaml
with your existing configuration.By @SimonSapin in https://github.com/apollographql/router/pull/6139
Support new
request_context
selector for telemetry (PR #6160)The router supports a new
request_context
selector for telemetry that enables access to the supergraph schema ID.You can configure the context to access the supergraph schema ID at the router service level:
You can use the selector in any service at any stage. While this example applies to
events
attributes, the selector can also be used on spans and instruments.By @bnjjj in https://github.com/apollographql/router/pull/6160
Support reading and setting
port
on request URIs using Rhai (Issue #5437)Custom Rhai scripts in the router now support the
request.uri.port
andrequest.subgraph.uri.port
functions for reading and setting URI ports. These functions enable you to update the full URI for subgraph fetches. For example:By @lleadbet in https://github.com/apollographql/router/pull/5439
🐛 Fixes
Fix various edge cases for
__typename
field (PR #6009)The router now correctly handles the
__typename
field used on operation root types, even when the subgraph's root type has a name that differs from the supergraph's root type.For example, given a query like this:
Even if the subgraph's root type returns a
__typename
that differs fromQuery
, the router will still useQuery
as the value of the__typename
field.This change also includes fixes for other edge cases related to the handling of
__typename
fields. For a detailed technical description of the edge cases that were fixed, please see this description.By @IvanGoncharov in https://github.com/apollographql/router/pull/6009
Support
uri
andmethod
properties on router "request" objects in Rhai (PR #6147)The router now supports accessing
request.uri
andrequest.method
properties from custom Rhai scripts. Previously, when trying to accessrequest.uri
andrequest.method
on a router request in Rhai, the router would return error messages stating the properties were undefined.An example Rhai script using these properties:
By @andrewmcgivery in https://github.com/apollographql/router/pull/6114
Cost calculation for subgraph requests with named fragments (PR #6162)
In some cases where subgraph GraphQL operations contain named fragments and abstract types, demand control used the wrong type for cost calculation, and could reject valid operations. Now, the correct type is used.
This fixes errors of the form:
By @goto-bus-stop in https://github.com/apollographql/router/pull/6162
Federation v2.9.3 (PR #6161)
This release updates to Federation v2.9.3, with query planner fixes:
__typename
may be omitted in the subgraph query.@key
/@requires
selection sets were not optimized away.@context
/@fromContext
.By @sachindshinde in https://github.com/apollographql/router/pull/6161
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 was generated by Mend Renovate. View the repository job log.