From 738b52d3c68a49d3af5ebbb8422bb72da2223a1f Mon Sep 17 00:00:00 2001 From: Graeme Coupar Date: Sat, 6 Apr 2024 13:54:18 +0100 Subject: [PATCH] fix: better type kind mismatch errors --- cynic-codegen/src/schema/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cynic-codegen/src/schema/mod.rs b/cynic-codegen/src/schema/mod.rs index 32682ce1..32cd178a 100644 --- a/cynic-codegen/src/schema/mod.rs +++ b/cynic-codegen/src/schema/mod.rs @@ -128,8 +128,8 @@ impl std::fmt::Display for SchemaError { found, } => write!( f, - "Expected type `{}` to be a {} but it was a {}", - name, expected, found + "The type `{}` is a {} in the GraphQL schema but is being used where we expect a {}", + name, found, expected, ), Self::InvalidTypeInSchema { name, details } => { write!(f, "Invalid schema when validating `{}`: {}", name, details)