Skip to content

Commit fe4ea0d

Browse files
fix: Failed parseLiteral gets null
These issues are caught by separate validation rules
1 parent db782bf commit fe4ea0d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/GraphQL/Utilities/ValueFromAST.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ func valueFromAST(
103103
}
104104

105105
if let leafType = type as? GraphQLLeafType {
106-
return try leafType.parseLiteral(valueAST: valueAST)
106+
do {
107+
return try leafType.parseLiteral(valueAST: valueAST)
108+
} catch {
109+
return .null
110+
}
107111
}
108112

109113
throw GraphQLError(message: "Provided type is not an input type")

0 commit comments

Comments
 (0)