From d564e36da9601baf6694718377085015bde3b4f2 Mon Sep 17 00:00:00 2001 From: Geoffroy Couprie Date: Tue, 6 Dec 2022 17:43:50 +0100 Subject: [PATCH] changelog & lint --- NEXT_CHANGELOG.md | 6 ++++++ apollo-router/src/spec/selection.rs | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index e1d6bfab1b..41d528fa5f 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -117,6 +117,12 @@ By [@Geal](https://github.com/geal) in https://github.com/apollographql/router/p When we drop Telemetry we spawn a thread to perform the global opentelemetry trace provider shutdown. The documentation of this function indicates that "This will invoke the shutdown method on all span processors. span processors should export remaining spans before return". We should give that process some time to complete (5 seconds currently) before returning from the `drop`. This will provide more opportunity for spans to be exported. By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/2191 +### Dispatch errors from the primary response to deferred responses ([Issue #1818](https://github.com/apollographql/router/issues/1818), [Issue #2185](https://github.com/apollographql/router/issues/2185)) + +When errors are generated during the primary execution, some of them can be affected to +deferred responses. + +By [@Geal](https://github.com/geal) in https://github.com/apollographql/router/pull/2192 ## 🛠 Maintenance diff --git a/apollo-router/src/spec/selection.rs b/apollo-router/src/spec/selection.rs index de08f9f08a..8e8cbf1685 100644 --- a/apollo-router/src/spec/selection.rs +++ b/apollo-router/src/spec/selection.rs @@ -4,6 +4,7 @@ use serde::Deserialize; use serde::Serialize; use serde_json_bytes::ByteString; +use super::Fragments; use crate::json_ext::Object; use crate::json_ext::PathElement; use crate::spec::TYPENAME; @@ -11,8 +12,6 @@ use crate::FieldType; use crate::Schema; use crate::SpecError; -use super::Fragments; - #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub(crate) enum Selection { Field { @@ -376,7 +375,7 @@ impl Selection { if let Some(f) = fragments.get(name) { f.selection_set .iter() - .any(|selection| selection.contains_error_path(&path, fragments)) + .any(|selection| selection.contains_error_path(path, fragments)) } else { false }