code: public function buildType($ref)
      {
          if (is_string($ref)) {
              return $this->internalBuildType($ref);
          }
  
          return $this->internalBuildType($ref->name->value, $ref);
      }
docs: @param string|NamedTypeNode $ref
  
  @return Type
  
  @throws Error