getType() public method

public getType ( ) : Youshido\GraphQL\Type\TypeInterface | AbstractObjectType
return Youshido\GraphQL\Type\TypeInterface | Youshido\GraphQL\Type\Object\AbstractObjectType
Exemplo n.º 1
0
 public function testInvalidParams()
 {
     $fieldConfig = new FieldConfig(['name' => 'FirstName', 'type' => new StringType(), 'resolve' => function ($value, $args = [], $type = null) {
         return 'John';
     }]);
     $this->assertEquals('FirstName', $fieldConfig->getName());
     $this->assertEquals(new StringType(), $fieldConfig->getType());
     $resolveFunction = $fieldConfig->getResolveFunction();
     $this->assertEquals('John', $resolveFunction([]));
 }