Skip to content

Commit

Permalink
update router-bridge (#1650)
Browse files Browse the repository at this point in the history
Fix #1546 
Fix #1584 
Fix #1633

Co-authored-by: Jesse Rosenberger <git@jro.cc>
  • Loading branch information
Geal and abernix authored Aug 30, 2022
1 parent 23d6a9f commit d0cab77
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ The helm chart never used to have a registry, so our docs were really just place

By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/1649


### Update router-bridge to `query-planner` v2.1.0 ([PR #1650](https://github.com/apollographql/router/pull/1650))

The 2.1.0 release of the query planner comes with fixes to fragment interpretation and reduced memory usage.

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/1650

## 🛠 Maintenance

### Remove cache layer ([PR #1647](https://github.com/apollographql/router/issues/1647))
Expand All @@ -46,7 +53,7 @@ By [@garypen](https://github.com/garypen) in https://github.com/apollographql/ro

### Refactor `SupergraphService` ([PR #1615](https://github.com/apollographql/router/issues/1615))

The `SupergrapHService` code became too complex, so much that `rsutfmt` could not modify it anymore.
The `SupergraphService` code became too complex, so much that `rsutfmt` could not modify it anymore.
This breaks up the code in more manageable functions.

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/1615
Expand Down
2 changes: 1 addition & 1 deletion apollo-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ reqwest = { version = "0.11.11", default-features = false, features = [
"json",
"stream",
] }
router-bridge = "0.1.0-alpha.1"
router-bridge = "0.1.0"
schemars = { version = "0.8.10", features = ["url"] }
sha2 = "0.10.2"
serde = { version = "1.0.144", features = ["derive", "rc"] }
Expand Down
4 changes: 2 additions & 2 deletions apollo-router/src/introspection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;

use router_bridge::introspect;
use router_bridge::introspect::IntrospectionError;
use router_bridge::planner::DeferStreamSupport;
use router_bridge::planner::IncrementalDeliverySupport;
use router_bridge::planner::QueryPlannerConfig;

use crate::cache::storage::CacheStorage;
Expand Down Expand Up @@ -58,7 +58,7 @@ impl Introspection {
schema_sdl,
vec![query.to_owned()],
QueryPlannerConfig {
defer_stream_support: Some(DeferStreamSupport {
incremental_delivery: Some(IncrementalDeliverySupport {
enable_defer: Some(self.defer_support),
}),
},
Expand Down
4 changes: 2 additions & 2 deletions apollo-router/src/query_planner/bridge_query_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::Arc;

use futures::future::BoxFuture;
use opentelemetry::trace::SpanKind;
use router_bridge::planner::DeferStreamSupport;
use router_bridge::planner::IncrementalDeliverySupport;
use router_bridge::planner::PlanSuccess;
use router_bridge::planner::Planner;
use router_bridge::planner::QueryPlannerConfig;
Expand Down Expand Up @@ -51,7 +51,7 @@ impl BridgeQueryPlanner {
Planner::new(
schema.as_string().to_string(),
QueryPlannerConfig {
defer_stream_support: Some(DeferStreamSupport {
incremental_delivery: Some(IncrementalDeliverySupport {
enable_defer: Some(configuration.server.experimental_defer_support),
}),
},
Expand Down
9 changes: 8 additions & 1 deletion apollo-router/src/spec/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,14 @@ mod tests {
Err(SchemaError::Api(s)) => {
assert_eq!(
s,
"The supergraph schema failed to produce a valid API schema"
r#"The supergraph schema failed to produce a valid API schema. Caused by:
Input field "InputObject.privateField" is @inaccessible but is used in the default value of "@foo(someArg:)", which is in the API schema.
GraphQL request:42:1
41 |
42 | input InputObject {
| ^
43 | someField: String"#
);
}
other => panic!("unexpected schema result: {:?}", other),
Expand Down

0 comments on commit d0cab77

Please sign in to comment.