Closed
Description
I haven't find anything about it in gql specs. Am I missing something?
private static function printInputObject(InputObjectType $type)
{
$fields = array_values($type->getFields());
return self::printDescription($type) .
"input {$type->name} {\n" .
implode("\n", array_map(function($f, $i) {
return self::printDescription($f, ' ', !$i) . ' ' . self::printInputValue($f);
}, $fields, array_keys($fields))) . "\n" .
"}";
}
doesn't print deprecation reason vs
private static function printObject(ObjectType $type)
{
$interfaces = $type->getInterfaces();
$implementedInterfaces = !empty($interfaces) ?
' implements ' . implode(', ', array_map(function($i) {
return $i->name;
}, $interfaces)) : '';
return self::printDescription($type) .
"type {$type->name}$implementedInterfaces {\n" .
self::printFields($type) . "\n" .
"}";
}
private static function printFields($type)
{
$fields = array_values($type->getFields());
return implode("\n", array_map(function($f, $i) {
return self::printDescription($f, ' ', !$i) . ' ' .
$f->name . self::printArgs($f->args, ' ') . ': ' .
(string) $f->getType() . self::printDeprecated($f);
}, $fields, array_keys($fields)));
}
Thanks!