-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): update dependency apollographql/router to v1.60.1 #12
base: 0.18.0
Are you sure you want to change the base?
Conversation
|
|
c148448
to
bbd7c84
Compare
bbd7c84
to
7871c69
Compare
7871c69
to
6b1a894
Compare
6b1a894
to
b626340
Compare
b626340
to
434e142
Compare
434e142
to
39de428
Compare
39de428
to
c67f2cf
Compare
c67f2cf
to
126d690
Compare
126d690
to
f264753
Compare
f264753
to
8f730fd
Compare
8f730fd
to
4dc9a30
Compare
4dc9a30
to
93081bd
Compare
93081bd
to
93fe1b7
Compare
5cfa735
to
49d57e0
Compare
49d57e0
to
2915d4b
Compare
2915d4b
to
e50e223
Compare
e50e223
to
40d7ecf
Compare
40d7ecf
to
a6b0b6d
Compare
a6b0b6d
to
c513754
Compare
c513754
to
10742ba
Compare
10742ba
to
283ea6e
Compare
283ea6e
to
95ec461
Compare
95ec461
to
db39c7e
Compare
db39c7e
to
b344217
Compare
b344217
to
9612fcd
Compare
9612fcd
to
ea833af
Compare
ea833af
to
a1abdd3
Compare
This PR contains the following updates:
v1.26.0
->v1.60.1
Release Notes
apollographql/router (apollographql/router)
v1.60.1
Compare Source
🐛 Fixes
Header propagation rules passthrough (PR #6690)
Header propagation contains logic to prevent headers from being propagated more than once. This was broken
in https://github.com/apollographql/router/pull/6281 which always considered a header propagated regardless if a rule
actually matched.
This PR alters the logic so that only when a header is populated then the header is marked as fixed.
The following will now work again:
Note that defaulting a head WILL populate a header, so make sure to include your defaults last in your propagation
rules.
Instead, make sure that your headers are defaulted last:
By @BrynCooke in https://github.com/apollographql/router/pull/6690
Entity cache: fix directive conflicts in cache-control header (Issue #6441)
Unnecessary cache-control directives are created in cache-control header. The router will now filter out unnecessary values from the
cache-control
header when the request resolves. So if there'smax-age=10, no-cache, must-revalidate, no-store
, the expected value for the cache-control header would simply beno-store
. Please see the MDN docs for justification of this reasoning: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#preventing_storingBy @bnjjj in https://github.com/apollographql/router/pull/6543
Resolve regressions in fragment compression for certain operations (PR #6651)
In v1.58.0 we introduced a new compression strategy for subgraph GraphQL operations to replace an older, more complicated algorithm.
While we were able to validate improvements for a majority of cases, some regressions still surfaced. To address this, we are extending it to compress more operations with the following outcomes:
By @dariuszkuc in https://github.com/apollographql/router/pull/6651
v1.60.0
Compare Source
🚀 Features
Improve BatchProcessor observability (Issue #6558)
A new metric has been introduced to allow observation of how many spans are being dropped by an telemetry batch processor.
apollo.router.telemetry.batch_processor.errors
- The number of errors encountered by exporter batch processors.name
: One ofapollo-tracing
,datadog-tracing
,jaeger-collector
,otlp-tracing
,zipkin-tracing
.error
= One ofchannel closed
,channel full
.By observing the number of spans dropped it is possible to estimate what batch processor settings will work for you.
In addition, the log message for dropped spans will now indicate which batch processor is affected.
By @bryncooke in https://github.com/apollographql/router/pull/6558
🐛 Fixes
Improve performance of query hashing by using a precomputed schema hash (PR #6622)
The router now uses a simpler and faster query hashing algorithm with more predictable CPU and memory usage. This improvement is enabled by using a precomputed hash of the entire schema, rather than computing and hashing the subset of types and fields used by each query.
For more details on why these design decisions were made, please see the PR description
By @IvanGoncharov in https://github.com/apollographql/router/pull/6622
Truncate invalid error paths (PR #6359)
This fix addresses an issue where the router was silently dropping subgraph errors that included invalid paths.
According to the GraphQL Specification an error path must point to a response field:
The router now truncates the path to the nearest valid field path if a subgraph error includes a path that can't be matched to a response field,
By @IvanGoncharov in https://github.com/apollographql/router/pull/6359
Eagerly init subgraph operation for subscription primary nodes (PR #6509)
When subgraph operations are deserialized, typically from a query plan cache, they are not automatically parsed into a full document. Instead, each node needs to initialize its operation(s) prior to execution. With this change, the primary node inside SubscriptionNode is initialized in the same way as other nodes in the plan.
By @tninesling in https://github.com/apollographql/router/pull/6509
Fix increased memory usage in
sysinfo
since Router 1.59.0 (PR #6634)In version 1.59.0, Apollo Router started using the
sysinfo
crate to gather metrics about available CPUs and RAM. By default, that crate usesrayon
internally to parallelize its handling of system processes. In turn, rayon creates a pool of long-lived threads.In a particular benchmark on a 32-core Linux server, this caused resident memory use to increase by about 150 MB. This is likely a combination of stack space (which only gets freed when the thread terminates) and per-thread space reserved by the heap allocator to reduce cross-thread synchronization cost.
This regression is now fixed by:
sysinfo
’s use ofrayon
, so the thread pool is not created and system processes information is gathered in a sequential loop.sysinfo
not gather that information in the first place since Router does not use it.By @SimonSapin in https://github.com/apollographql/router/pull/6634
Optimize demand control lookup (PR #6450)
The performance of demand control in the router has been optimized.
Previously, demand control could reduce router throughput due to its extra processing required for scoring.
This fix improves performance by shifting more data to be computed at plugin initialization and consolidating lookup queries:
By @tninesling in https://github.com/apollographql/router/pull/6450
Fix missing Content-Length header in subgraph requests (Issue #6503)
A change in
1.59.0
caused the Router to send requests to subgraphs without aContent-Length
header, which would cause issues with some GraphQL servers that depend on that header.This solves the underlying bug and reintroduces the
Content-Length
header.By @nmoutschen in https://github.com/apollographql/router/pull/6538
🛠 Maintenance
Remove the legacy query planner (PR #6418)
The legacy query planner has been removed in this release. In the previous release, router v1.58, it was no longer used by default but was still available through the
experimental_query_planner_mode
configuration key. That key is now removed.Also removed are configuration keys which were only relevant to the legacy planner:
supergraph.query_planning.experimental_parallelism
: the new planner can always use available parallelism.supergraph.experimental_reuse_query_fragments
: this experimental algorithm that attempted toreuse fragments from the original operation while forming subgraph requests is no longer present. Instead, by default new fragment definitions are generated based on the shape of the subgraph operation.
By @SimonSapin in https://github.com/apollographql/router/pull/6418
Migrate various metrics to OTel instruments (PR #6476, PR #6356, PR #6539)
Various metrics using our legacy mechanism based on the
tracing
crate are migrated to OTel instruments.By @goto-bus-stop in https://github.com/apollographql/router/pull/6476, https://github.com/apollographql/router/pull/6356, https://github.com/apollographql/router/pull/6539
📚 Documentation
Add instrumentation configuration examples (PR #6487)
The docs for router telemetry have new example configurations for common use cases for selectors and condition.
By @shorgi in https://github.com/apollographql/router/pull/6487
🧪 Experimental
Remove experimental_retry option (PR #6338)
The
experimental_retry
option has been removed due to its limited use and functionality during its experimental phase.By @bnjjj in https://github.com/apollographql/router/pull/6338
v1.59.2
Compare Source
🐛 Fixes
Improve performance of query hashing by using a precomputed schema hash (PR #6622)
The router now uses a simpler and faster query hashing algorithm with more predictable CPU and memory usage. This improvement is enabled by using a precomputed hash of the entire schema, rather than computing and hashing the subset of types and fields used by each query.
For more details on why these design decisions were made, please see the PR description
By @IvanGoncharov in https://github.com/apollographql/router/pull/6622
Fix increased memory usage in
sysinfo
since Router 1.59.0 (PR #6634)In version 1.59.0, Apollo Router started using the
sysinfo
crate to gather metrics about available CPUs and RAM. By default, that crate usesrayon
internally to parallelize its handling of system processes. In turn, rayon creates a pool of long-lived threads.In a particular benchmark on a 32-core Linux server, this caused resident memory use to increase by about 150 MB. This is likely a combination of stack space (which only gets freed when the thread terminates) and per-thread space reserved by the heap allocator to reduce cross-thread synchronization cost.
This regression is now fixed by:
sysinfo
’s use ofrayon
, so the thread pool is not created and system processes information is gathered in a sequential loop.sysinfo
not gather that information in the first place since Router does not use it.By @SimonSapin in https://github.com/apollographql/router/pull/6634
v1.59.1
Compare Source
🐛 Fixes
Fix transmitted header value for Datadog priority sampling resolution (PR #6017)
The router now transmits correct values of
x-datadog-sampling-priority
to downstream services.Previously, an
x-datadog-sampling-priority
of-1
was incorrectly converted to0
for downstream requests, and2
was incorrectly converted to1
. When propagating to downstream services, this resulted in values ofUSER_REJECT
being incorrectly transmitted asAUTO_REJECT
.Enable accurate Datadog APM metrics (PR #6017)
The router supports a new preview feature, the
preview_datadog_agent_sampling
option, to enable sending all spans to the Datadog Agent so APM metrics and views are accurate.Previously, the sampler option in
telemetry.exporters.tracing.common.sampler
wasn't Datadog-aware. To get accurate Datadog APM metrics, all spans must be sent to the Datadog Agent with apsr
orsampling.priority
attribute set appropriately to record the sampling decision.The
preview_datadog_agent_sampling
option enables accurate Datadog APM metrics. It should be used when exporting to the Datadog Agent, via OTLP or Datadog-native.Using these options can decrease your Datadog bill, because you will be sending only a percentage of spans from the Datadog Agent to Datadog.
Learn more by reading the updated Datadog tracing documentation for more information on configuration options and their implications.
Fix non-parent sampling (PR #6481)
When the user specifies a non-parent sampler the router should ignore the information from upstream and use its own sampling rate.
The following configuration would not work correctly:
All spans are being sampled.
This is now fixed and the router will correctly ignore any upstream sampling decision.
By @BrynCooke in https://github.com/apollographql/router/pull/6481
v1.59.0
Compare Source
🚀 Features
General availability of native query planner
The router's native, Rust-based, query planner is now generally available and enabled by default.
The native query planner achieves better performance for a variety of graphs. In our tests, we observe:
apollo.router.query_planning.plan.duration
)The native query planner supports Federation v2 supergraphs. If you are using Federation v1 today, see our migration guide on how to update your composition build step. Subgraph changes are typically not needed.
The legacy, JavaScript, query planner is deprecated in this release, but you can still switch
back to it if you are still using Federation v1 supergraph:
By @sachindshinde, @goto-bus-stop, @duckki, @TylerBloom, @SimonSapin, @dariuszkuc, @lrlna, @clenfest, and @o0Ignition0o.
Ability to skip persisted query list safelisting enforcement via plugin (PR #6403)
If safelisting is enabled, a
router_service
plugin can skip enforcement of the safelist (including therequire_id
check) by adding the keyapollo_persisted_queries::safelist::skip_enforcement
with valuetrue
to the request context.In cases where an operation would have been denied but is allowed due to the context key existing, the attribute
persisted_queries.safelist.enforcement_skipped
is set on theapollo.router.operations.persisted_queries
metric with valuetrue
.By @glasser in https://github.com/apollographql/router/pull/6403
Add fleet awareness plugin (PR #6151)
A new
fleet_awareness
plugin has been added that reports telemetry to Apollo about the configuration and deployment of the router.The reported telemetry include CPU and memory usage, CPU frequency, and other deployment characteristics such as operating system and cloud provider. For more details, along with a full list of data captured and how to opt out, go to our
data privacy policy.
By @jonathanrainer, @nmoutschen, @loshz in https://github.com/apollographql/router/pull/6151
Add fleet awareness schema metric (PR #6283)
The router now supports the
apollo.router.instance.schema
metric for itsfleet_detector
plugin. It has two attributes:schema_hash
andlaunch_id
.By @loshz and @nmoutschen in https://github.com/apollographql/router/pull/6283
Support client name for persisted query lists (PR #6198)
The persisted query manifest fetched from Apollo Uplink can now contain a
clientName
field in each operation. Two operations with the sameid
but differentclientName
are considered to be distinct operations, and they may have distinct bodies.The router resolves the client name by taking the first from the following that exists:
apollo_persisted_queries::client_name
context key that may be set by arouter_service
plugintelemetry.apollo.client_name_header
, which defaults toapollographql-client-name
If a client name can be resolved for a request, the router first tries to find a persisted query with the specified ID and the resolved client name.
If there is no operation with that ID and client name, or if a client name cannot be resolved, the router tries to find a persisted query with the specified ID and no client name specified. This means that existing PQ lists that don't contain client names will continue to work.
To learn more, go to persisted queries docs.
By @glasser in https://github.com/apollographql/router/pull/6198
🐛 Fixes
Fix coprocessor empty body object panic (PR #6398)
Previously, the router would panic if a coprocessor responds with an empty body object at the supergraph stage:
This has been fixed in this release.
By @BrynCooke in https://github.com/apollographql/router/pull/6398
Ensure cost directives are picked up when not explicitly imported (PR #6328)
With the recent composition changes, importing
@cost
results in a supergraph schema with the cost specification import at the top. The@cost
directive itself is not explicitly imported, as it's expected to be available as the default export from the cost link. In contrast, uses of@listSize
to translate to an explicit import in the supergraph.Old SDL link
New SDL link
Instead of using the directive names from the import list in the link, the directive names now come from
SpecDefinition::directive_name_in_schema
, which is equivalent to the change we made on the composition side.By @tninesling in https://github.com/apollographql/router/pull/6328
Fix query hashing algorithm (PR #6205)
The router includes a schema-aware query hashing algorithm designed to return the same hash across schema updates if the query remains unaffected. This update enhances the algorithm by addressing various corner cases to improve its reliability and consistency.
By @Geal in https://github.com/apollographql/router/pull/6205
Fix typo in persisted query metric attribute (PR #6332)
The
apollo.router.operations.persisted_queries
metric reports an attribute when a persisted query was not found.Previously, the attribute name was
persisted_quieries.not_found
, with onei
too many. Now it'spersisted_queries.not_found
.By @goto-bus-stop in https://github.com/apollographql/router/pull/6332
Fix telemetry instrumentation using supergraph query selector (PR #6324)
Previously, router telemetry instrumentation that used query selectors could log errors with messages such as
this is a bug and should not happen
.These errors have now been fixed, and configurations with query selectors such as the following work properly:
By @bnjjj in https://github.com/apollographql/router/pull/6324
More consistent attributes on
apollo.router.operations.persisted_queries
metric (PR #6403)Version 1.28.1 added several unstable metrics, including
apollo.router.operations.persisted_queries
.When an operation is rejected, Router includes a
persisted_queries.safelist.rejected.unknown
attribute on the metric. Previously, this attribute had the valuetrue
if the operation is logged (vialog_unknown
), andfalse
if the operation is not logged. (The attribute is not included at all if the operation is not rejected.) This appears to have been a mistake, as you can also tell whether it is logged via thepersisted_queries.logged
attribute.Router now only sets this attribute to true, and never to false. Note these metrics are unstable and will continue to change.
By @glasser in https://github.com/apollographql/router/pull/6403
Drop experimental reuse fragment query optimization option (PR #6354)
Drop support for the experimental reuse fragment query optimization. This implementation was not only very slow but also very buggy due to its complexity.
Auto generation of fragments is a much simpler (and faster) algorithm that in most cases produces better results. Fragment auto generation is the default optimization since v1.58 release.
By @dariuszkuc in https://github.com/apollographql/router/pull/6353
📃 Configuration
Add version number to distributed query plan cache keys (PR #6406)
The router now includes its version number in the cache keys of distributed cache entries. Given that a new router release may change how query plans are generated or represented, including the router version in a cache key enables the router to use separate cache entries for different versions.
If you have enabled distributed query plan caching, expect additional processing for your cache to update for this router release.
By @SimonSapin in https://github.com/apollographql/router/pull/6406
🛠 Maintenance
Remove catch_unwind wrapper around the native query planner (PR #6397)
As part of internal maintenance of the query planner, the
catch_unwind
wrapper around the native query planner has been removed. This wrapper served as an extra safeguard for potential panics the native planner could produce. Thenative query planner however no longer has any code paths that could panic. We have also
not witnessed a panic in the last four months, having processed 560 million real
user operations through the native planner.
This maintenance work also removes backtrace capture for federation errors, which
was used for debugging and is no longer necessary as we have the confidence in
the native planner's implementation.
By @lrlna in https://github.com/apollographql/router/pull/6397
Deprecate various metrics (PR #6350)
Several metrics have been deprecated in this release, in favor of OpenTelemetry-compatible alternatives:
apollo_router_deduplicated_subscriptions_total
- use theapollo.router.operations.subscriptions
metric'ssubscriptions.deduplicated
attribute.apollo_authentication_failure_count
- use theapollo.router.operations.authentication.jwt
metric'sauthentication.jwt.failed
attribute.apollo_authentication_success_count
- use theapollo.router.operations.authentication.jwt
metric instead. If theauthentication.jwt.failed
attribute is absent orfalse
, the authentication succeeded.apollo_require_authentication_failure_count
- use thehttp.server.request.duration
metric'shttp.response.status_code
attribute. Requests with authentication failures have HTTP status code 401.apollo_router_timeout
- this metric conflates timed-out requests from client to the router, and requests from the router to subgraphs. Timed-out requests have HTTP status code 504. Use thehttp.response.status_code
attribute on thehttp.server.request.duration
metric to identify timed-out router requests, and the same attribute on thehttp.client.request.duration
metric to identify timed-out subgraph requests.The deprecated metrics will continue to work in the 1.x release line.
By @goto-bus-stop in https://github.com/apollographql/router/pull/6350
v1.58.1
Compare Source
🐛 Fixes
Particular
supergraph
telemetry customizations using thequery
selector do not error (PR #6324)Telemetry customizations like those featured in the request limits telemetry documentation now work as intended when using the
query
selector on thesupergraph
layer. Prior to this fix, this was sometimes causing athis is a bug and should not happen
error, but is now resolved.By @bnjjj in https://github.com/apollographql/router/pull/6324
Native query planner now receives both "plan" and "path" limits configuration (PR #6316)
The native query planner now correctly sets two experimental configuration options for limiting query planning complexity. These were previously available in the configuration and observed by the legacy planner, but were not being passed to the new native planner until now:
supergraph.query_planning.experimental_plans_limit
supergraph.query_planning.experimental_paths_limit
By @goto-bus-stop in https://github.com/apollographql/router/pull/6316
v1.58.0
Compare Source
🚀 Features
Support DNS resolution strategy configuration (PR #6109)
The router now supports a configurable DNS resolution strategy for the URLs of coprocessors and subgraphs.
The new option is called
dns_resolution_strategy
and supports the following values:ipv4_only
- Only query forA
(IPv4) records.ipv6_only
- Only query forAAAA
(IPv6) records.ipv4_and_ipv6
- Query for bothA
(IPv4) andAAAA
(IPv6) records in parallel.ipv6_then_ipv4
- Query forAAAA
(IPv6) records first; if that fails, query forA
(IPv4) records.ipv4_then_ipv6
(default) - Query forA
(IPv4) records first; if that fails, query forAAAA
(IPv6) records.You can change the DNS resolution strategy applied to a subgraph's URL:
You can also change the DNS resolution strategy applied to a coprocessor's URL:
By @IvanGoncharov in https://github.com/apollographql/router/pull/6109
Configuration options for HTTP/1 max headers and buffer limits (PR #6194)
This update introduces configuration options that allow you to adjust the maximum number of HTTP/1 request headers and the maximum buffer size allocated for headers.
By default, the router accepts HTTP/1 requests with up to 100 headers and allocates ~400 KiB of buffer space to store them. If you need to handle requests with more headers or require a different buffer size, you can now configure these limits in the router's configuration file:
If you are using the router as a Rust crate, the
http1_request_max_buf_size
option requires thehyper_header_limits
feature and also necessitates using Apollo's fork of the Hyper crate until the changes are merged upstream.You can include this fork by adding the following patch to your Cargo.toml file:
By @IvanGoncharov in https://github.com/apollographql/router/pull/6194
Compress subgraph operations by generating fragments (PR #6013)
The router now compresses operations sent to subgraphs by default by generating fragment
definitions and using them in the operation.
This change enables
generate_query_fragments
by default while disablingexperimental_reuse_query_fragments
. When enabled,experimental_reuse_query_fragments
attempts to intelligently reuse the fragment definitionsfrom the original operation. However, fragment generation with
generate_query_fragments
is much faster and produces better outputs in most cases.If you are relying on the shape of fragments in your subgraph operations or tests, you can opt out of the new algorithm with the configuration below.
By @lrlna in https://github.com/apollographql/router/pull/6013
Add subgraph request id (PR #5858)
The router now supports a subgraph request ID that is a unique string identifying a subgraph request and response. It allows plugins and coprocessors to keep some state per subgraph request by matching on this ID. It's available in coprocessors as
subgraphRequestId
and Rhai scripts asrequest.subgraph.id
andresponse.subgraph.id
.By @Geal in https://github.com/apollographql/router/pull/5858
Add
extensions.service
for all subgraph errors (PR #6191)For improved debuggability, the router now supports adding a subgraph's name as an extension to all errors originating from the subgraph.
If
include_subgraph_errors
istrue
for a particular subgraph, all errors originating in this subgraph will have the subgraph's name exposed as aservice
extension.You can enable subgraph errors with the following configuration:
Consequently, when a subgraph returns an error, it will have a
service
extension with the subgraph name as its value. The following example shows the extension for aproducts
subgraph:By @IvanGoncharov in https://github.com/apollographql/router/pull/6191
Add
@context
support in the native query planner (PR #6310)The
@context
feature is now available in the native query planner.This brings the native query planner to feature parity with the legacy query planner for all Federation v2 graphs. The native query planner can be enabled with the following configuration:
By @clenfest, @TylerBloom in https://github.com/apollographql/router/pull/6310
🐛 Fixes
Remove noisy demand control logs (PR #6192)
Demand control no longer logs warnings when a subgraph response is missing a requested field.
By @tninesling in https://github.com/apollographql/router/pull/6192
Renamed headers' original values can again be propagated (PR #6281)
PR #4535 introduced a regression where the following header propagation config would not work:
The goal of the original PR was to prevent multiple headers from being mapped to a single target header. However, it did not consider renames and instead prevented multiple mappings from the same source header.
The router now propagates headers properly and ensures that a target header is only propagated to once.
By @BrynCooke in https://github.com/apollographql/router/pull/6281
Introspection response deduplication should always produce results (Issue #6249)
To reduce CPU usage, query planning and introspection queries are deduplicated. In some cases, deduplicated introspection queries were not receiving their result. This issue has been fixed, and the router now sends results in all cases.
By @Geal in https://github.com/apollographql/router/pull/6257
Don't log response data upon notification failure for subgraph batching (PR #6150)
For a subgraph batching operation, the router now doesn't log the entire subgraph response when failing to notify a waiting batch participant. This saves the router from logging the large amount of data (PII and/or non-PII data) that a subgraph response may contain.
By @garypen in https://github.com/apollographql/router/pull/6150
Move heavy computation to a thread pool with a priority queue (PR #6247)
The router now avoids blocking threads when executing asynchronous code by using a thread pool with a priority queue.
This improves the performance of the following components that can take non-trivial amounts of CPU time:
The size of the thread pool is based on the number of available CPU cores.
The thread pool replaces the router's prior implementation that used Tokio’s
spawn_blocking
.apollo.router.compute_jobs.queued
is a new gauge metric for the number of items in the thread pool's priority queue.By @SimonSapin in https://github.com/apollographql/router/pull/6247
Limit the amount of GraphQL validation errors returned per response (PR #6187)
When an invalid query is submitted, the router now returns at most one hundred GraphQL parsing and validation errors in a response. This prevents generating too large of a response for a nonsensical document.
By @goto-bus-stop in https://github.com/apollographql/router/pull/6187
Remove placeholders from file upload query variables (PR #6293)
Previously, file upload query variables in subgraph requests incorrectly contained internal placeholders.
According to the GraphQL Multipart Request Spec, these variables should be set to null.
This issue has been fixed by ensuring that the router complies with the specification and improving compatibility with subgraphs handling file uploads.
By @IvanGoncharov in https://github.com/apollographql/router/pull/6293
Overhead processing metrics should exclude subgraph response time when deduplication is enabled (PR #6207)
The router's calculated overhead processing time has been fixed, where the time spent waiting for the subgraph response of a deduplicated request had been incorrectly included.
By @Geal in https://github.com/apollographql/router/pull/6207
Fix demand control panic for custom scalars that represent non-GraphQL-compliant JSON (PR #6288)
Previously, a panic could be triggered in the router's demand control plugin with the following schema:
Then, submitting the query
and variables
During scoring, the demand control plugin would attempt to convert the variable structure into a GraphQL-compliant structure requiring valid GraphQL names as keys. The dot characters in the keys however would cause a panic.
With this fix, only the GraphQL compliant part of the input object is scored, and the arbitrary JSON marked by the custom scalar is scored as an opaque scalar (similar to how built-ins like
Int
orString
are processed).By @tninesling in https://github.com/apollographql/router/pull/6288
Fix incorrect overriding of concrete type names with interface names when merging responses (PR #6250)
When using
@interfaceObject
, differing pieces of data can come back with either concrete types or interface types depending on the source. Previously, receiving the data in a particular order could incorrectly result in the interface name of a type overwriting its concrete name.To make the response merging order-agnostic, the router now checks the schema to ensure concrete types are not overwritten with interfaces or less specific types.
By @tninesling in https://github.com/apollographql/router/pull/6250
🛠 Maintenance
Query planner cache key improvements (Issue #5160)
Several performance improvements have been implemented for query plan cache key generation. In particular, the distributed cache's key format has changed, which adds prefixes to the different key segments to help in debugging.
By @Geal in https://github.com/apollographql/router/pull/6206
Add entity caching invalidation configuration metrics (PR #6286)
We've added metrics for our analytics to know if entity caching invalidation is enabled.
By @bnjjj in https://github.com/apollographql/router/pull/6286
Avoid creating stub span for supergraph events if current span exists (PR #6096)
The router optimized its telemetry implementation by not creating a redundant span when it already has a span available to use the span's extensions for supergraph events.
By @bnjjj in https://github.com/apollographql/router/pull/6096
📚 Documentation
Clarify docs for authorization directive composition (PR #6216)
The docs for authorization directive composition have been clarified, including corrected code examples.
By @Meschreiber in https://github.com/apollographql/router/pull/6216
v1.57.1
Compare Source
🐛 Fixes
Progressive override: fix query planner cache warmup (PR #6108)
This fixes an issue in progressive override where the override labels were not transmitted to the query planner during cache warmup. Queries were correctly using the overridden fields at first, but after an update, reverted to non overridden fields, and could not recover.
By @Geal in https://github.com/apollographql/router/pull/6108
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]
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ 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.