Inheritance: extends Youshido\GraphQL\Schema\AbstractSchema
Example #1
0
 public function testStandaloneSchema()
 {
     $schema = new TestSchema();
     $this->assertTrue($schema->getQueryType()->hasFields());
     $this->assertTrue($schema->getMutationType()->hasFields());
     $this->assertEquals(1, count($schema->getMutationType()->getFields()));
     $schema->addMutationField('changeUser', ['type' => new TestObjectType(), 'resolve' => function () {
     }]);
     $this->assertEquals(2, count($schema->getMutationType()->getFields()));
 }