Skip to content
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.51.0 #1988

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 17, 2024

Mend Renovate

This PR contains the following updates:

Package Update Change
apollographql/router minor 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:

coprocessor:
  url: http://127.0.0.1:3000 # mandatory URL which is the address of the coprocessor
  timeout: 2s # optional timeout (2 seconds in this example). If not set, defaults to 1 second
  supergraph:
    response: 
      condition:
        not:
          eq:
          - subscription
          - operation_kind: string
      body: true

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 to false:

supergraph:
  query_planning:
    legacy_introspection_caching: false

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:

telemetry:
  instrumentation:
    instruments:
      subgraph:
        http.client.request.duration:
          attributes:
            subgraph.graphql.errors: # attribute containing a boolean set to true if response.errors is not empty
              subgraph_on_graphql_error: true

By @​bnjjj in https://github.com/apollographql/router/pull/5622

🐛 Fixes
Add response_context in event selector for event_* 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 the response_context selector in attributes. Previous releases didn't support the response_context selector in attributes.

An example configuration:

telemetry:
  instrumentation:
    instruments:
      supergraph:
        sf.graphql_router.errors:
          value: event_unit
          type: counter
          unit: count
          description: "graphql errors handled by the apollo router"
          condition:
            eq:
            - true
            - on_graphql_error: true
          attributes:
            "operation":
              response_context: "operation_name" # This was not working before

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 both line and column to be positive numbers.

As an example, a subgraph can respond with invalid error locations:

{
    "data": { "topProducts": null },
    "errors": [{
        "message":"Some error on subgraph",
        "locations": [
            { "line": -1, "column": -1 },
        ],
        "path":["topProducts"]
    }]
}

With this change, the router returns a response that ignores the invalid locations:

{
    "data": { "topProducts": null },
    "errors": [{
        "message":"Some error on subgraph",
        "path":["topProducts"]
    }]
}

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)

[!NOTE]
This is an incremental improvement, but we expect more improvements in Router v1.52.0 after https://github.com/apollographql/router/pull/5609/ lands.

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:

  1. The OpenTelemetry for Datadog approach (which is the recommended method). This is identified by otlp in YAML configuration, and it is not impacted by this fix.
  2. The "Datadog native" configuration. This is identified by the use of a 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 and fixed_span_names options:

telemetry:
  exporters:
    tracing:
      datadog:
        enabled: true

##### Enables resource mapping, previously disabled by default, but now enabled.
        enable_span_mapping: true

##### Enables fixed span names, defaults to true.
        fixed_span_names: true

  instrumentation:
    spans:
      mode: spec_compliant

With enable_span_mapping set to true (now default), the following resource mappings are applied:

OpenTelemetry Span Name Datadog Span Operation Name
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:

telemetry:
  exporters:
    tracing:
      datadog:
        enabled: true
        resource_mapping:

##### Use `my.span.attribute` as the resource name for the `router` span
          router: "my.span.attribute"

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner July 17, 2024 01:21
@jonathanrainer jonathanrainer added this to the v0.25.0 milestone Jul 17, 2024
@renovate renovate bot force-pushed the renovate/apollographql-router-1.x branch from 3c83566 to 81b757f Compare July 17, 2024 07:22
Copy link
Contributor

@jonathanrainer jonathanrainer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jonathanrainer jonathanrainer merged commit 5352ab0 into main Jul 17, 2024
18 checks passed
@jonathanrainer jonathanrainer deleted the renovate/apollographql-router-1.x branch July 17, 2024 07:47
@jonathanrainer jonathanrainer mentioned this pull request Jul 19, 2024
jonathanrainer added a commit that referenced this pull request Jul 22, 2024
# [0.25.0] - 2024-07-22

## 🚀 Features

- **Enable Retries For Transient Errors Connecting To Graphs/Subgraphs -
@jonathanrainer PR #1936**

This turns on retries at the HTTP level for connections to
graphs/subgraphs to minimize connection resets and cancellations. Also,
a new --subgraph-retries flag for rover dev lets you set the number of
retries allowed when trying to re-establish a connection.

- **Add `--graph-ref` flag to `rover dev` - @dotdat PR #1984**

Introduces subgraph mirroring to rover dev. Subgraph mirroring inherits
the subgraph routing URLs and schemas from an existing Studio graphref.
This makes it easy to spin up a locally running supergraph without
maintaining a supergraph config. [See
here](https://www.apollographql.com/docs/rover/commands/dev#starting-a-session-from-a-graphos-studio-variant)
for more information.

## 🐛 Fixes

- **Fixes issues related to passing filenames to `--output` -
@jonathanrainer PR #1996**

An issue was raised whereby previous versions of Rover supported passing
filenames to the `--output` flag but this was
broken in v0.24.0. This has now been fixed and the previous
functionality restored.

## 🛠 Maintenance

- **Expand Smoke Tests To Run On All Supported Platforms -
@jonathanrainer PR #1980**
- **Fix cron expression, so it runs only once per day - @jonathanrainer
PR #1986**
- **Ensure we always use the correct version of Federation when testing
- @jonathanrainer PR #1987**
- **Add manual Smoke test invocation and pin Windows to `npm@9` for
testing - @jonathanrainer PR #1989**
- **Update apollographql/router to v1.51.0 - @jonathanrainer PR #1988**
- **Update node.js packages - @jonathanrainer PR #1979**

Includes `@eslint/compat` to v1.1.1, `eslint` to v9.7.0, `node.js` to
v20.15.1, `npm` to v10.8.2 and `prettier` to v3.3.3

- **Make sure x86 Mac Tests use 'latest' supergraph plugin version -
@jonathanrainer PR #1990**
- **Make sure homebrew runs `brew update` when we use it -
@jonathanrainer PR #1993**



## 📚 Documentation

- **Adds `graph-ref` flag to dev subcommand docs - @jackonawalk PR
#1945**
- **Update schema proposals capabilities docs - @Meschreiber PR #1949**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant