From 9e39279dfc45769f598153c49826b89ad9610d30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 15:31:05 +0000 Subject: [PATCH 1/4] Bump graphiql from 4.1.1 to 4.1.2 in /juniper Bumps [graphiql](https://github.com/graphql/graphiql/tree/HEAD/packages/graphiql) from 4.1.1 to 4.1.2. - [Release notes](https://github.com/graphql/graphiql/releases) - [Changelog](https://github.com/graphql/graphiql/blob/main/packages/graphiql/CHANGELOG.md) - [Commits](https://github.com/graphql/graphiql/commits/graphiql@4.1.2/packages/graphiql) --- updated-dependencies: - dependency-name: graphiql dependency-version: 4.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- juniper/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/juniper/package.json b/juniper/package.json index d552597cd..64c829afc 100644 --- a/juniper/package.json +++ b/juniper/package.json @@ -4,7 +4,7 @@ "postinstall": "make graphiql graphql-playground" }, "dependencies": { - "graphiql": "4.1.1", + "graphiql": "4.1.2", "graphql-playground-react": "1.7.28" } } From 09cef7762d9b9ec795e5344300d31f5a80b5d0c3 Mon Sep 17 00:00:00 2001 From: tyranron Date: Mon, 9 Jun 2025 18:03:19 +0200 Subject: [PATCH 2/4] Satisfy `mismatched_lifetime_syntaxes` rustc lint on nightly --- juniper/src/ast.rs | 6 +-- juniper/src/executor/look_ahead.rs | 2 +- juniper/src/parser/tests/document.rs | 48 +++++++++---------- juniper/src/schema/model.rs | 12 ++--- juniper/src/schema/schema.rs | 8 ++-- .../rules/overlapping_fields_can_be_merged.rs | 2 +- 6 files changed, 38 insertions(+), 40 deletions(-) diff --git a/juniper/src/ast.rs b/juniper/src/ast.rs index a505969b2..dc92cfcff 100644 --- a/juniper/src/ast.rs +++ b/juniper/src/ast.rs @@ -626,11 +626,11 @@ impl<'a, S> Arguments<'a, S> { self.items.into_iter() } - pub fn iter(&self) -> slice::Iter<(Spanning<&'a str>, Spanning>)> { + pub fn iter(&self) -> slice::Iter<'_, (Spanning<&'a str>, Spanning>)> { self.items.iter() } - pub fn iter_mut(&mut self) -> slice::IterMut<(Spanning<&'a str>, Spanning>)> { + pub fn iter_mut(&mut self) -> slice::IterMut<'_, (Spanning<&'a str>, Spanning>)> { self.items.iter_mut() } @@ -648,7 +648,7 @@ impl<'a, S> Arguments<'a, S> { } impl<'a, S> VariableDefinitions<'a, S> { - pub fn iter(&self) -> slice::Iter<(Spanning<&'a str>, VariableDefinition<'a, S>)> { + pub fn iter(&self) -> slice::Iter<'_, (Spanning<&'a str>, VariableDefinition<'a, S>)> { self.items.iter() } } diff --git a/juniper/src/executor/look_ahead.rs b/juniper/src/executor/look_ahead.rs index cef956f06..8c815a5c9 100644 --- a/juniper/src/executor/look_ahead.rs +++ b/juniper/src/executor/look_ahead.rs @@ -819,7 +819,7 @@ mod tests { use super::*; - fn parse_document_source(q: &str) -> UnlocatedParseResult> + fn parse_document_source(q: &str) -> UnlocatedParseResult> where S: ScalarValue, { diff --git a/juniper/src/parser/tests/document.rs b/juniper/src/parser/tests/document.rs index d2fd3f124..31c7ac433 100644 --- a/juniper/src/parser/tests/document.rs +++ b/juniper/src/parser/tests/document.rs @@ -8,7 +8,7 @@ use crate::{ value::{DefaultScalarValue, ScalarValue}, }; -fn parse_document(s: &str) -> OwnedDocument +fn parse_document(s: &str) -> OwnedDocument<'_, S> where S: ScalarValue, { @@ -33,46 +33,44 @@ fn parse_document_error(s: &str) -> Spanning { fn simple_ast() { assert_eq!( parse_document::( - r#" - { + r#"{ node(id: 4) { id name } - } - "# + }"#, ), vec![Definition::Operation(Spanning::start_end( - &SourcePosition::new(13, 1, 12), - &SourcePosition::new(124, 6, 13), + &SourcePosition::new(0, 0, 0), + &SourcePosition::new(111, 5, 13), Operation { operation_type: OperationType::Query, name: None, variable_definitions: None, directives: None, selection_set: vec![Selection::Field(Spanning::start_end( - &SourcePosition::new(31, 2, 16), - &SourcePosition::new(110, 5, 17), + &SourcePosition::new(18, 1, 16), + &SourcePosition::new(97, 4, 17), Field { alias: None, name: Spanning::start_end( - &SourcePosition::new(31, 2, 16), - &SourcePosition::new(35, 2, 20), + &SourcePosition::new(18, 1, 16), + &SourcePosition::new(22, 1, 20), "node", ), arguments: Some(Spanning::start_end( - &SourcePosition::new(35, 2, 20), - &SourcePosition::new(42, 2, 27), + &SourcePosition::new(22, 1, 20), + &SourcePosition::new(29, 1, 27), Arguments { items: vec![( Spanning::start_end( - &SourcePosition::new(36, 2, 21), - &SourcePosition::new(38, 2, 23), + &SourcePosition::new(23, 1, 21), + &SourcePosition::new(25, 1, 23), "id", ), Spanning::start_end( - &SourcePosition::new(40, 2, 25), - &SourcePosition::new(41, 2, 26), + &SourcePosition::new(27, 1, 25), + &SourcePosition::new(28, 1, 26), graphql_input_value!(4), ), )], @@ -81,13 +79,13 @@ fn simple_ast() { directives: None, selection_set: Some(vec![ Selection::Field(Spanning::start_end( - &SourcePosition::new(65, 3, 20), - &SourcePosition::new(67, 3, 22), + &SourcePosition::new(52, 2, 20), + &SourcePosition::new(54, 2, 22), Field { alias: None, name: Spanning::start_end( - &SourcePosition::new(65, 3, 20), - &SourcePosition::new(67, 3, 22), + &SourcePosition::new(52, 2, 20), + &SourcePosition::new(54, 2, 22), "id", ), arguments: None, @@ -96,13 +94,13 @@ fn simple_ast() { }, )), Selection::Field(Spanning::start_end( - &SourcePosition::new(88, 4, 20), - &SourcePosition::new(92, 4, 24), + &SourcePosition::new(75, 3, 20), + &SourcePosition::new(79, 3, 24), Field { alias: None, name: Spanning::start_end( - &SourcePosition::new(88, 4, 20), - &SourcePosition::new(92, 4, 24), + &SourcePosition::new(75, 3, 20), + &SourcePosition::new(79, 3, 24), "name", ), arguments: None, diff --git a/juniper/src/schema/model.rs b/juniper/src/schema/model.rs index 34704bbc6..550565790 100644 --- a/juniper/src/schema/model.rs +++ b/juniper/src/schema/model.rs @@ -310,7 +310,7 @@ impl SchemaType { } /// Get a type by name. - pub fn type_by_name(&self, name: impl AsRef) -> Option> { + pub fn type_by_name(&self, name: impl AsRef) -> Option> { self.types.get(name.as_ref()).map(|t| TypeType::Concrete(t)) } @@ -329,7 +329,7 @@ impl SchemaType { } /// Get the query type from the schema. - pub fn query_type(&self) -> TypeType { + pub fn query_type(&self) -> TypeType<'_, S> { TypeType::Concrete( self.types .get(self.query_type_name.as_str()) @@ -345,7 +345,7 @@ impl SchemaType { } /// Get the mutation type from the schema. - pub fn mutation_type(&self) -> Option> { + pub fn mutation_type(&self) -> Option> { self.mutation_type_name.as_ref().map(|name| { self.type_by_name(name) .expect("Mutation type does not exist in schema") @@ -361,7 +361,7 @@ impl SchemaType { } /// Get the subscription type. - pub fn subscription_type(&self) -> Option> { + pub fn subscription_type(&self) -> Option> { self.subscription_type_name.as_ref().map(|name| { self.type_by_name(name) .expect("Subscription type does not exist in schema") @@ -377,7 +377,7 @@ impl SchemaType { } /// Get a list of types. - pub fn type_list(&self) -> Vec> { + pub fn type_list(&self) -> Vec> { let mut types = self .types .values() @@ -393,7 +393,7 @@ impl SchemaType { } /// Make a type. - pub fn make_type(&self, ty: &Type>) -> TypeType { + pub fn make_type(&self, ty: &Type>) -> TypeType<'_, S> { match ty { Type::List(inner, expected_size) => { TypeType::List(Box::new(self.make_type(inner)), *expected_size) diff --git a/juniper/src/schema/schema.rs b/juniper/src/schema/schema.rs index c74694f97..732ffe982 100644 --- a/juniper/src/schema/schema.rs +++ b/juniper/src/schema/schema.rs @@ -142,7 +142,7 @@ impl SchemaType { self.description.as_ref() } - fn types(&self) -> Vec> { + fn types(&self) -> Vec> { self.type_list() .into_iter() .filter(|t| { @@ -157,17 +157,17 @@ impl SchemaType { } #[graphql(name = "queryType")] - fn query_type_(&self) -> TypeType { + fn query_type_(&self) -> TypeType<'_, S> { self.query_type() } #[graphql(name = "mutationType")] - fn mutation_type_(&self) -> Option> { + fn mutation_type_(&self) -> Option> { self.mutation_type() } #[graphql(name = "subscriptionType")] - fn subscription_type_(&self) -> Option> { + fn subscription_type_(&self) -> Option> { self.subscription_type() } diff --git a/juniper/src/validation/rules/overlapping_fields_can_be_merged.rs b/juniper/src/validation/rules/overlapping_fields_can_be_merged.rs index 0bafc45ca..b6fb97ef4 100644 --- a/juniper/src/validation/rules/overlapping_fields_can_be_merged.rs +++ b/juniper/src/validation/rules/overlapping_fields_can_be_merged.rs @@ -56,7 +56,7 @@ impl OrderedMap { } } - fn iter(&self) -> OrderedMapIter { + fn iter(&self) -> OrderedMapIter<'_, K, V> { OrderedMapIter { map: &self.data, inner: self.insert_order.iter(), From 4e6bdb92fbfa0daf9d82e8a67b79dc4a244f16e0 Mon Sep 17 00:00:00 2001 From: tyranron Date: Mon, 9 Jun 2025 18:10:54 +0200 Subject: [PATCH 3/4] Regen --- juniper/src/http/graphiql.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/juniper/src/http/graphiql.html b/juniper/src/http/graphiql.html index 088ae6c61..c59abc017 100644 --- a/juniper/src/http/graphiql.html +++ b/juniper/src/http/graphiql.html @@ -31,7 +31,7 @@ Date: Mon, 9 Jun 2025 18:12:11 +0200 Subject: [PATCH 4/4] Upd CHANGELOG --- juniper/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/juniper/CHANGELOG.md b/juniper/CHANGELOG.md index fc249f103..9efc8ffa2 100644 --- a/juniper/CHANGELOG.md +++ b/juniper/CHANGELOG.md @@ -87,7 +87,7 @@ All user visible changes to `juniper` crate will be documented in this file. Thi ### Changed -- Upgraded [GraphiQL] to [4.1.1 version](https://github.com/graphql/graphiql/blob/graphiql%404.1.1/packages/graphiql/CHANGELOG.md#411). ([#1325]) +- Upgraded [GraphiQL] to [4.1.2 version](https://github.com/graphql/graphiql/blob/graphiql%404.1.2/packages/graphiql/CHANGELOG.md#412). ([#1326]) ### Fixed @@ -109,7 +109,7 @@ All user visible changes to `juniper` crate will be documented in this file. Thi [#1311]: /../../pull/1311 [#1318]: /../../pull/1318 [#1324]: /../../pull/1324 -[#1325]: /../../pull/1325 +[#1326]: /../../pull/1326 [1b1fc618]: /../../commit/1b1fc61879ffdd640d741e187dc20678bf7ab295 [20609366]: /../../commit/2060936635609b0186d46d8fbd06eb30fce660e3