We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 205a522 commit 586de0aCopy full SHA for 586de0a
src/Introspection/Introspection.php
@@ -407,7 +407,17 @@ function ($inputValue) {
407
//$inputValue can either be GraphQLArgument or GraphQLTypeField
408
function ($inputValue) {
409
$defaultValue = $inputValue->getDefaultValue();
410
- return $defaultValue !== null ? strval($defaultValue) : null;
+
411
+ // handle null
412
+ if ($defaultValue === null)
413
+ return null;
414
415
+ // handle booleans
416
+ if (is_bool($defaultValue))
417
+ return $defaultValue ? "true" : "false";
418
419
+ // handle other types
420
+ return strval($defaultValue);
421
}
422
),
423
new GraphQLTypeField(
0 commit comments