Skip to content

Commit

Permalink
fix: better type kind mismatch errors (#889)
Browse files Browse the repository at this point in the history
A user ran into this particular error message and it wasn't clear to
them what their mistake was. This change hopefully makes things clearer.
  • Loading branch information
obmarg authored Apr 6, 2024
1 parent 7bb1e9d commit 21cec74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cynic-codegen/src/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 21cec74

Please sign in to comment.