GraphQL\Tests\Executor\ExecutorTest::testUsesTheInlineOperationIfNoOperationIsProvided PHP Метод

testUsesTheInlineOperationIfNoOperationIsProvided() публичный Метод

    public function testUsesTheInlineOperationIfNoOperationIsProvided()
    {
        $doc = '{ a }';
        $data = ['a' => 'b'];
        $ast = Parser::parse($doc);
        $schema = new Schema(['query' => new ObjectType(['name' => 'Type', 'fields' => ['a' => ['type' => Type::string()]]])]);
        $ex = Executor::execute($schema, $ast, $data);
        $this->assertEquals(['data' => ['a' => 'b']], $ex->toArray());
    }