Skip to content

Commit ab13f32

Browse files
committed
Fix accidental logic error in argument checking
1 parent e1c59a4 commit ab13f32

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/validation/rules/ArgumentsOfCorrectType.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ export function ArgumentsOfCorrectType(context: ValidationContext): any {
3838
var argDef = context.getArgument();
3939
if (argDef) {
4040
var errors = isValidLiteralValue(argDef.type, argAST.value);
41-
}
42-
if (errors.length) {
43-
return new GraphQLError(
44-
badValueMessage(
45-
argAST.name.value,
46-
argDef.type,
47-
print(argAST.value),
48-
errors
49-
),
50-
[ argAST.value ]
51-
);
41+
if (errors.length) {
42+
return new GraphQLError(
43+
badValueMessage(
44+
argAST.name.value,
45+
argDef.type,
46+
print(argAST.value),
47+
errors
48+
),
49+
[ argAST.value ]
50+
);
51+
}
5252
}
5353
}
5454
};

0 commit comments

Comments
 (0)