def tag_resolver(f, tag):
    """
    Tags a resolver function with a specific tag that can be read by a Middleware to denote specific functionality.
    :param f: The function to tag.
    :param tag: The tag to add to the function.
    :return: The function with the tag added.
    """
    if not hasattr(f, '_resolver_tags'):
        f._resolver_tags = set()
    f._resolver_tags.add(tag)
    return f
