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