File tree Expand file tree Collapse file tree
source/graphql/validation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ class SchemaValidator(Schema) : Visitor {
255255 }
256256
257257 override void enter (const (Argument ) arg) {
258- import std.algorithm.searching : find;
258+ import std.algorithm.searching : find, endsWith ;
259259 const argName = arg.name.value;
260260 if (this .directiveStack.empty) {
261261 const parent = this .schemaStack[$ - 2 ];
@@ -286,7 +286,10 @@ class SchemaValidator(Schema) : Visitor {
286286
287287 string typeStr = astTypeToString(* varType);
288288 enforce! VariableInputTypeMismatch(
289- argElem.front[Constants.typenameOrig] == typeStr,
289+ argElem.front[Constants.typenameOrig] == typeStr
290+ || (typeStr.endsWith(" !" )
291+ && typeStr[0 .. $ - 1 ] == argElem.front[Constants.typenameOrig])
292+ ,
290293 format(" Variable type '%s' does not match argument type '%s'"
291294 , argElem.front[Constants.typenameOrig], typeStr));
292295 }
You can’t perform that action at this time.
0 commit comments