*/ public array $fragments; /** @var mixed */ public $rootValue; /** @var mixed */ public $contextValue; public OperationDefinitionNode $operation; /** @var array */ public array $variableValues; /** * @var callable * * @phpstan-var FieldResolver */ public $fieldResolver; /** * @var callable * * @phpstan-var ArgsMapper */ public $argsMapper; /** @var list */ public array $errors; public PromiseAdapter $promiseAdapter; /** * @param array $fragments * @param mixed $rootValue * @param mixed $contextValue * @param array $variableValues * @param list $errors * * @phpstan-param FieldResolver $fieldResolver */ public function __construct( Schema $schema, array $fragments, $rootValue, $contextValue, OperationDefinitionNode $operation, array $variableValues, array $errors, callable $fieldResolver, callable $argsMapper, PromiseAdapter $promiseAdapter ) { $this->schema = $schema; $this->fragments = $fragments; $this->rootValue = $rootValue; $this->contextValue = $contextValue; $this->operation = $operation; $this->variableValues = $variableValues; $this->errors = $errors; $this->fieldResolver = $fieldResolver; $this->argsMapper = $argsMapper; $this->promiseAdapter = $promiseAdapter; } public function addError(Error $error): void { $this->errors[] = $error; } }