code: private function getNamedTypeNode(TypeNode $typeNode)
      {
          $namedType = $typeNode;
          while ($namedType->kind === NodeKind::LIST_TYPE || $namedType->kind === NodeKind::NON_NULL_TYPE) {
              $namedType = $namedType->type;
          }
  
          return $namedType;
      }
docs: @param TypeNode|ListTypeNode|NonNullTypeNode $typeNode
  
  @return TypeNode