Update printSchema for recent SDL change to implements

This commit is contained in:
Vladimir Razuvaev 2018-08-08 15:07:08 +07:00
parent fcb9c24bb5
commit 56e91d008e
2 changed files with 5 additions and 3 deletions

View File

@ -159,7 +159,7 @@ class SchemaPrinter
{
$interfaces = $type->getInterfaces();
$implementedInterfaces = !empty($interfaces) ?
' implements ' . implode(', ', array_map(function($i) {
' implements ' . implode(' & ', array_map(function($i) {
return $i->name;
}, $interfaces)) : '';
return self::printDescription($options, $type) .

View File

@ -21,7 +21,9 @@ class SchemaPrinterTest extends TestCase
private function printForTest($schema)
{
return "\n" . SchemaPrinter::doPrint($schema);
$schemaText = SchemaPrinter::doPrint($schema);
$this->assertEquals($schemaText, SchemaPrinter::doPrint(BuildSchema::build($schemaText)));
return "\n" . $schemaText;
}
private function printSingleFieldSchema($fieldConfig)
@ -464,7 +466,7 @@ interface Baaz {
int: Int
}
type Bar implements Foo, Baaz {
type Bar implements Foo & Baaz {
str: String
int: Int
}