def is_classvar(cls: type, annotation: Union[ForwardRef, str]) -> bool:
    """Returns True if the annotation is a ClassVar."""
    # This code was copied from the dataclassses cpython implementation to check
    # if a field is annotated with ClassVar or not, taking future annotations
    # in consideration.
    if dataclasses._is_classvar(annotation, typing):  # type: ignore
        return True

    annotation_str = (
        annotation.__forward_arg__ if isinstance(annotation, ForwardRef) else annotation
    )
    return isinstance(annotation_str, str) and dataclasses._is_type(  # type: ignore
        annotation_str,
        cls,
        typing,
        typing.ClassVar,
        dataclasses._is_classvar,  # type: ignore
    )
Returns True if the annotation is a ClassVar.
strawberry/utils/typing.py