diff --git a/graphql_server/CHANGELOG.md b/graphql_server/CHANGELOG.md index f6a1d166..b8d17ebc 100644 --- a/graphql_server/CHANGELOG.md +++ b/graphql_server/CHANGELOG.md @@ -3,6 +3,7 @@ * Now that variables are `InputValueContext` descendants, handle them the same way as other values in `coerceArgumentValues`. TLDR - Removed now-obsolete, variable-specific logic in `coerceArgumentValues`. +* Pass `argumentName`, not `fieldName`, to type validations. # 1.0.1 * Fix a bug where `globalVariables` were not being properly passed diff --git a/graphql_server/lib/graphql_server.dart b/graphql_server/lib/graphql_server.dart index 2ff007ff..b8355dae 100644 --- a/graphql_server/lib/graphql_server.dart +++ b/graphql_server/lib/graphql_server.dart @@ -416,7 +416,7 @@ class GraphQL { } else { try { var validation = argumentType.validate( - fieldName, argumentValue.value.computeValue(variableValues)); + argumentName, argumentValue.value.computeValue(variableValues)); if (!validation.successful) { var errors = [