public function testExecutesInterfaceTypesWithInlineFragments()
{
// This is the valid version of the query in the above test.
$ast = Parser::parse('
{
__typename
name
friends {
__typename
name
... on Dog {
woofs
}
... on Cat {
meows
}
}
}
');
$expected = ['data' => ['__typename' => 'Person', 'name' => 'John', 'friends' => [['__typename' => 'Person', 'name' => 'Liz'], ['__typename' => 'Dog', 'name' => 'Odie', 'woofs' => true]]]];
$this->assertEquals($expected, Executor::execute($this->schema, $ast, $this->john)->toArray());
}