def empty_connection(connection_type=None, pageinfo_type=None):
    connection_type = connection_type or Connection
    pageinfo_type = pageinfo_type or PageInfo

    return connection_type(
        edges=[],
        page_info=pageinfo_type(
            start_cursor=None,
            end_cursor=None,
            has_previous_page=False,
            has_next_page=False,
        )
    )
Helper to get an empty connection.
dataset/ETHPy150Open graphql-python/graphql-relay-py/graphql_relay/connection/arrayconnection.py/empty_connection