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