from typing import Optional
from typing import Iterable
from typing import Any


def iterable_to_fields(fields: Optional[Iterable[Any]]) -> str:
    """Convert iterable to query fields string"""
    fields = f"{', '.join(i for i in fields)}" if fields else "*"
    return fields