PHP Класс GraphQL\Type\Definition\ResolveInfo

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$fieldASTs GraphQL\Language\AST\FieldNode[]
$fieldName string
$fieldNodes GraphQL\Language\AST\FieldNode[]
$fragments GraphQL\Language\AST\FragmentDefinitionNode[]
$operation GraphQL\Language\AST\OperationDefinitionNode
$parentType Type | CompositeType
$path array
$returnType OutputType
$rootValue mixed
$schema GraphQL\Schema
$variableValues

Открытые методы

Метод Описание
__construct ( array $values )
__get ( $name )
getFieldSelection ( integer $depth ) : array Helper method that returns names of all fields selected in query for $this->fieldName up to $depth levels

Приватные методы

Метод Описание
foldSelectionSet ( SelectionSetNode $selectionSet, $descend )

Описание методов

__construct() публичный метод

public __construct ( array $values )
$values array

__get() публичный метод

public __get ( $name )

getFieldSelection() публичный метод

query AppHomeRoute{viewer{id,..._0c28183ce}} fragment _0c28183ce on Viewer{id,profile{firstName,id,locations{id}}} Example: query MyQuery{ { root { id, nested { nested1 nested2 { nested3 } } } } Given this ResolveInfo instance is a part of "root" field resolution, and $depth === 1, method will return: [ 'id' => true, 'nested' => [ nested1 => true, nested2 => true ] ]
public getFieldSelection ( integer $depth ) : array
$depth integer How many levels to include in output
Результат array

Описание свойств

$fieldASTs публичное свойство

Устаревший: as of 8.0 (Renamed to $fieldNodes)
public FieldNode[],GraphQL\Language\AST $fieldASTs
Результат GraphQL\Language\AST\FieldNode[]

$fieldName публичное свойство

public string $fieldName
Результат string

$fieldNodes публичное свойство

public FieldNode[],GraphQL\Language\AST $fieldNodes
Результат GraphQL\Language\AST\FieldNode[]

$fragments публичное свойство

public FragmentDefinitionNode[],GraphQL\Language\AST $fragments
Результат GraphQL\Language\AST\FragmentDefinitionNode[]

$operation публичное свойство

public OperationDefinitionNode,GraphQL\Language\AST $operation
Результат GraphQL\Language\AST\OperationDefinitionNode

$parentType публичное свойство

public Type,GraphQL\Type\Definition|CompositeType $parentType
Результат Type | CompositeType

$path публичное свойство

public array $path
Результат array

$returnType публичное свойство

public OutputType $returnType
Результат OutputType

$rootValue публичное свойство

public mixed $rootValue
Результат mixed

$schema публичное свойство

public Schema,GraphQL $schema
Результат GraphQL\Schema

$variableValues публичное свойство

public $variableValues