From c828ebe0a8048b149e344527eef83a6bdcc70f9e Mon Sep 17 00:00:00 2001 From: meskill <8974488+meskill@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:31:16 +0000 Subject: [PATCH] fix tests --- src/core/blueprint/schema.rs | 6 ++++-- src/core/config/reader.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/blueprint/schema.rs b/src/core/blueprint/schema.rs index 9fcb619c96..c194e67d10 100644 --- a/src/core/blueprint/schema.rs +++ b/src/core/blueprint/schema.rs @@ -10,7 +10,8 @@ use crate::core::directive::DirectiveCodec; fn validate_query(config: &Config) -> Valid<&str, BlueprintError> { let query_type_name = config .schema - .query.as_deref() + .query + .as_deref() // Based on the [spec](https://spec.graphql.org/October2021/#sec-Root-Operation-Types.Default-Root-Operation-Type-Names) // the default name for query type is `Query` is not specified explicitly .unwrap_or("Query"); @@ -72,7 +73,8 @@ pub fn validate_field_has_resolver( fn validate_mutation(config: &Config) -> Valid, BlueprintError> { let mutation_type_name = config .schema - .mutation.as_deref() + .mutation + .as_deref() // Based on the [spec](https://spec.graphql.org/October2021/#sec-Root-Operation-Types.Default-Root-Operation-Type-Names) // the default name for mutation type is `Mutation` is not specified explicitly .unwrap_or("Mutation"); diff --git a/src/core/config/reader.rs b/src/core/config/reader.rs index 5240e658e8..6463eefc79 100644 --- a/src/core/config/reader.rs +++ b/src/core/config/reader.rs @@ -357,7 +357,7 @@ mod reader_tests { let config = reader .read(format!( - "{}/examples/jsonplaceholder_script.graphql", + "{}/examples/jsonplaceholder_script.yaml", cargo_manifest )) .await