Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[0.9.4] - 2022-06-14
❗ BREAKING ❗
The
apollo-router-core
crate has been merged intoapollo-router
(PR #1189)To upgrade, remove any dependency on the
apollo-router-core
crate from yourCargo.toml
files and change imports like so:By @SimonSapin in #1189
Fix input validation rules (PR #1211)
The GraphQL specification provides two sets of coercion / validation rules, depending on whether we're dealing with inputs or outputs.
We have added validation rules for specified input validations which were not previously implemented.
This is a breaking change since slightly invalid input may have validated before but will now be guarded by newly-introduced validation rules.
By @o0Ignition0o in #1211
🚀 Features
Add trace logs for parsing recursion consumption (PR #1222)
The
apollo-parser
package now implements recursion limits which can be examined after the parsing phase. The router logs theseout at
trace
level. You can see them in your logs by searching for "recursion_limit
". For example, when using JSON loggingand using
jq
to filter the output:This example output shows that the maximum recursion limit is 4096 and that the query we processed caused us to recurse 4 times.
By @garypen in #1222
Helm chart now has the option to use an existing secrets for API key PR #1196
This change allows the use of an already existing secret for the graph API key.
To use existing secrets, update your own
values.yaml
file or specify the value on yourhelm install
command line. For example:By @pellizzetti in #1196
Add iterators to
Context
(PR #1202)Context can now be iterated over, with two new methods:
iter()
iter_mut()
These implementations lean heavily on an underlying
DashMap
implemetation, so refer to its documentation for more usage details.By @garypen in #1202
Add an experimental optimization to deduplicate variables in query planner (PR #872)
Get rid of duplicated variables in requests and responses of the query planner. This optimization is disabled by default, if you want to enable it you just need override your configuration:
By @bnjjj in #872
Add more customizable metrics (PR #1159)
Added the ability to apply custom attributes/labels to metrics which are derived from header values using the Router's configuration file. For example:
By @bnjjj in #1159
Allow to set a custom health check path (PR #1164)
Added the possibility to set a custom health check path
By @jcaromiq in #1164
🐛 Fixes ( 🐛 )
Pin
clap
dependency inCargo.toml
(PR #1232)A minor release of
Clap
occured yesterday which introduced a breaking change. This change might leadcargo scaffold
users to hit a panic a runtime when the router tries to parse environment variables and arguments.This patch pins the
clap
dependency to the version that was available before the release, until the root cause is found and fixed upstream.By @o0Ignition0o in #1232
Display better error message when on subgraph fetch errors (PR #1201)
Show a helpful error message when a subgraph does not return JSON or a bad status code
By @bnjjj in #1201
Fix CORS configuration to eliminate runtime panic on misconfiguration (PR #1197)
Previously, it was possible to specify a CORS configuration which was syntactically valid, but which could not be enforced at runtime. For example, consider the following invalid configuration where the
allow_any_origin
andallow_credentials
parameters are inherantly incompatible with each other (per the CORS specification):Previously, this would result in a runtime panic. The router will now detect this kind of misconfiguration and report the error without panicking.
By @garypen in #1197
🛠 Maintenance ( 🛠️ )
Groundwork for
@defer
support (PR #1175PR #1206)To prepare for the implementation of the
@defer
directive, theExecutionResponse
andRouterResponse
types now carry a stream of responses instead of a unique response. For now that stream contains only one item, so there is no change in behaviour.By @Geal in #1206
Fix a flappy test to test custom health check path (PR #1176)
Force the creation of
SocketAddr
to use a new unused port to avoid port collisions during testing.By @bnjjj in #1176
Add static
@skip
/@include
directive support (PR #1185)InlineFragment
implementation@include
and@skip
directivesBy @bnjjj in #1185
Update
buildstructor
to 0.3 (PR #1207)Update
buildstructor
to v0.3.By @bryncooke in #1207