github apollographql/router v1.48.1

latest releases: v1.50.0-rc.0, v1.49.1, v1.49.1-rc.0...
18 days ago

🐛 Fixes

Improve error message produced when a subgraph response doesn't include an expected content-type header value (Issue #5359)

To improve a common debuggability challenge when a subgraph response doesn't contain an expected content-type header value, the error message produced will include additional details about the error.

Some examples of the improved error message:

  • HTTP fetch failed from 'test': subgraph response contains invalid 'content-type' header value "application/json,application/json"; expected content-type: application/json or content-type: application/graphql-response+json
    
  • HTTP fetch failed from 'test': subgraph response does not contain 'content-type' header; expected content-type: application/json or content-type: application/graphql-response+json
    

By @IvanGoncharov in #5223

Update apollo-compiler for two small improvements (PR #5347)

Updated our underlying apollo-rs dependency on our apollo-compiler crate to bring in two nice improvements:

  • Fix validation performance bug

    Adds a cache in fragment spread validation, fixing a situation where validating a query with many fragment spreads against a schema with many interfaces could take multiple seconds to validate.

  • Remove ariadne byte/char mapping

    Generating JSON or CLI reports for apollo-compiler diagnostics used a translation layer between byte offsets and character offsets, which cost some computation and memory proportional to the size of the source text. The latest version of ariadne allows us to remove this translation.

By @goto-bus-stop in #5347

📃 Configuration

Rename the telemetry selector which obtains the GraphOS operation id (PR #5337)

Renames a misnamed trace_id selector introduced in v1.48.0 to the value which it actually represents which is an Apollo GraphOS operation ID, rather than a trace ID. Apologies for the confusion! Unfortunately, we aren't able to produce an Apollo GraphOS trace ID at this time.

If you want to access this operation ID selector, here is an example of how to apply it to your tracing spans:

telemetry:
  instrumentation:
    spans:
      router:
        "studio.operation.id":
            studio_operation_id: true

This can be useful for more easily locating the operation in GraphOS' Insights feature and finding applicable traces in Studio.

By @bnjjj in #5337

Don't miss a new router release

NewReleases is sending notifications on new releases.