Skip to content

Commit 1f98244

Browse files
committed
fix bug: allow null on defaultValue on Field Argument
1 parent e895a62 commit 1f98244

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Introspection/Introspection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ function ($inputValue) {
406406
"",
407407
//$inputValue can either be GraphQLArgument or GraphQLTypeField
408408
function ($inputValue) {
409-
return strval($inputValue->getDefaultValue());
409+
$defaultValue = $inputValue->getDefaultValue();
410+
return $defaultValue !== null ? strval($defaultValue) : null;
410411
}
411412
),
412413
new GraphQLTypeField(

0 commit comments

Comments
 (0)