✨ 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 #337Synchronous 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 #284The 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 newserde_json_bytes
, which acts as an envelope around an underlyingbytes::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
fromPreparedQuery
'sexecute
via #328...and followed up with #367
-
Bumped/upstream improvements to
test_span
via #359...and
apollographql/test-span#11
upstreamInternally, 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.