PHP Class GraphQL\Type\Definition\FieldDefinition

Show file Open project: webonyx/graphql-php Class Usage Examples

Public Properties

Property Type Description
$args FieldArgument[]
$config array Original field definition config
$deprecationReason string | null
$description string | null
$mapFn callable Mutually exclusive with resolve
$name string
$resolveFn callable Mutually exclusive with map

Public Methods

Method Description
create ( array | Config $field, string $typeName = null ) : FieldDefinition
createMap ( array $fields, string $parentTypeName = null ) : array
defaultComplexity ( $childrenComplexity ) : mixed
getArg ( $name ) : FieldArgument | null
getComplexityFn ( ) : callable | Closure
getDefinition ( ) : array
getType ( ) : Type
isDeprecated ( ) : boolean

Protected Methods

Method Description
__construct ( array $config ) FieldDefinition constructor.

Method Details

__construct() protected method

FieldDefinition constructor.
protected __construct ( array $config )
$config array

create() public static method

public static create ( array | Config $field, string $typeName = null ) : FieldDefinition
$field array | Config
$typeName string
return FieldDefinition

createMap() public static method

public static createMap ( array $fields, string $parentTypeName = null ) : array
$fields array
$parentTypeName string
return array

defaultComplexity() public static method

public static defaultComplexity ( $childrenComplexity ) : mixed
$childrenComplexity
return mixed

getArg() public method

public getArg ( $name ) : FieldArgument | null
$name
return FieldArgument | null

getComplexityFn() public method

public getComplexityFn ( ) : callable | Closure
return callable | Closure

getDefinition() public static method

public static getDefinition ( ) : array
return array

getType() public method

public getType ( ) : Type
return Type

isDeprecated() public method

public isDeprecated ( ) : boolean
return boolean

Property Details

$args public property

public FieldArgument[],GraphQL\Type\Definition $args
return FieldArgument[]

$config public property

Original field definition config
public array $config
return array

$deprecationReason public property

public string|null $deprecationReason
return string | null

$description public property

public string|null $description
return string | null

$mapFn public property

Mutually exclusive with resolve
public callable $mapFn
return callable

$name public property

public string $name
return string

$resolveFn public property

Mutually exclusive with map
public callable $resolveFn
return callable