schema = $schema; $this->fragments = $fragments; $this->rootValue = $rootValue; $this->contextValue = $contextValue; $this->operation = $operation; $this->variableValues = $variableValues; $this->errors = $errors ?? []; $this->fieldResolver = $fieldResolver; $this->promiseAdapter = $promiseAdapter; } public function addError(Error $error) { $this->errors[] = $error; return $this; } }