mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-25 06:16:05 +03:00
Document BC and fix types in ResolveInfo
(cherry picked from commit 376e927505
)
This commit is contained in:
parent
bf471838ae
commit
16d42dead3
@ -78,6 +78,9 @@ Parser::parse($source, [ 'allowLegacySDLImplementsInterfaces' => true])
|
||||
- `AbstractQuerySecurity` renamed to `QuerySecurityRule` (NS `GraphQL\Validator\Rules`)
|
||||
- `FindBreakingChanges` renamed to `BreakingChangesFinder` (NS `GraphQL\Utils`)
|
||||
|
||||
### Breaking: new constructors
|
||||
|
||||
`GraphQL\Type\Definition\ResolveInfo` now takes 10 arguments instead of one array.
|
||||
|
||||
## Upgrade v0.11.x > v0.12.x
|
||||
|
||||
|
@ -23,7 +23,7 @@ class ResolveInfo
|
||||
* The name of the field being resolved
|
||||
*
|
||||
* @api
|
||||
* @var string|null
|
||||
* @var string
|
||||
*/
|
||||
public $fieldName;
|
||||
|
||||
@ -31,9 +31,9 @@ class ResolveInfo
|
||||
* AST of all nodes referencing this field in the query.
|
||||
*
|
||||
* @api
|
||||
* @var FieldNode[]|null
|
||||
* @var FieldNode[]
|
||||
*/
|
||||
public $fieldNodes;
|
||||
public $fieldNodes = [];
|
||||
|
||||
/**
|
||||
* Expected return type of the field being resolved
|
||||
@ -47,7 +47,7 @@ class ResolveInfo
|
||||
* Parent type of the field being resolved
|
||||
*
|
||||
* @api
|
||||
* @var ObjectType|null
|
||||
* @var ObjectType
|
||||
*/
|
||||
public $parentType;
|
||||
|
||||
@ -55,7 +55,7 @@ class ResolveInfo
|
||||
* Path to this field from the very root value
|
||||
*
|
||||
* @api
|
||||
* @var string[]
|
||||
* @var string[][]
|
||||
*/
|
||||
public $path;
|
||||
|
||||
@ -71,9 +71,9 @@ class ResolveInfo
|
||||
* AST of all fragments defined in query
|
||||
*
|
||||
* @api
|
||||
* @var FragmentDefinitionNode[]|null
|
||||
* @var FragmentDefinitionNode[]
|
||||
*/
|
||||
public $fragments;
|
||||
public $fragments = [];
|
||||
|
||||
/**
|
||||
* Root value passed to query execution
|
||||
@ -95,21 +95,29 @@ class ResolveInfo
|
||||
* Array of variables passed to query execution
|
||||
*
|
||||
* @api
|
||||
* @var mixed[]|null
|
||||
* @var mixed[]
|
||||
*/
|
||||
public $variableValues;
|
||||
public $variableValues = [];
|
||||
|
||||
/**
|
||||
* @param FieldNode[] $fieldNodes
|
||||
* @param ScalarType|ObjectType|InterfaceType|UnionType|EnumType|ListOfType|NonNull $returnType
|
||||
* @param string[][] $path
|
||||
* @param FragmentDefinitionNode[] $fragments
|
||||
* @param mixed|null $rootValue
|
||||
* @param mixed[] $variableValues
|
||||
*/
|
||||
public function __construct(
|
||||
string $fieldName,
|
||||
$fieldNodes,
|
||||
$returnType,
|
||||
ObjectType $parentType,
|
||||
$path,
|
||||
array $path,
|
||||
Schema $schema,
|
||||
$fragments,
|
||||
array $fragments,
|
||||
$rootValue,
|
||||
?OperationDefinitionNode $operation,
|
||||
$variableValues
|
||||
array $variableValues
|
||||
) {
|
||||
$this->fieldName = $fieldName;
|
||||
$this->fieldNodes = $fieldNodes;
|
||||
|
Loading…
Reference in New Issue
Block a user