mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-29 00:25:17 +03:00
Update printSchema for recent SDL change to implements
This commit is contained in:
parent
fcb9c24bb5
commit
56e91d008e
@ -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) .
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user