github apollographql/router v0.1.0-alpha.4

latest releases: v1.58.0, v1.58.0-rc.3, v1.58.0-rc.2...
2 years ago

✨ Features

  • Unix socket support via #158

    ...and via upstream tokios-rs/tokio#4385

    The Router can now listen on Unix domain sockets (i.e., IPC) in addition to the existing IP-based (port) listening. This should bring further compatibility with upstream intermediaries who also allow support this form of communication!

    (Thank you to @cecton, both for the PR that landed this feature but also for contributing the upstream PR to tokio.)

🐛 Fixes

  • Resolved hangs occurring on Router reload when jaeger was configured via #337

    Synchronous calls being made to opentelemetry::global::set_tracer_provider were causing the runtime to misbehave when the configuration (file) was adjusted (and thus, hot-reloaded) on account of the root context of that call being asynchronous.

    This change adjusts the call to be made from a new thread. Since this only affected potential runtime configuration changes (again, hot-reloads on a configuration change), the thread spawn is a reasonable solution.

💅 Improvements

Most of the improvements this time are internal to the code-base but that doesn't mean we shouldn't talk about them. A great developer experience matters both internally and externally! 😸

  • Store JSON strings in a bytes::Bytes instance via #284

    The router does a a fair bit of deserialization, filtering, aggregation and re-serializing of JSON objects. Since we currently operate on a dynamic schema, we've been relying on serde_json::Value to represent this data internally.

    After this change, that Value type is now replaced with an equivalent type from a new serde_json_bytes, which acts as an envelope around an underlying bytes::Bytes. This allows us to refer to the buffer that contained the JSON data while avoiding the allocation and copying costs on each string for values that are largely unused by the Router directly.

    This should offer future benefits when implementing — e.g., query de-duplication and caching — since a single buffer will be usable by multiple responses at the same time.

  • Development workflow improvement via #367

    Polished away some existing Problems reported by rust-analyzer and added troubleshooting instructions to our documentation.

  • Removed unnecessary Arc from PreparedQuery's execute via #328

    ...and followed up with #367

  • Bumped/upstream improvements to test_span via #359

    ...and apollographql/test-span#11 upstream

    Internally, this is just a version bump to the Router, but it required upstream changes to the test-span crate. The bump brings new filtering abilities and adjusts the verbosity of spans tracing levels, and removes non-determinism from tests.

Don't miss a new router release

NewReleases is sending notifications on new releases.