Ensure all tags are used in some filter.

def _validate_all_tags_are_used(metadata):
    """Ensure all tags are used in some filter."""
    tag_names = set([tag_name for tag_name, _ in metadata.tags])
    filter_arg_names = set()
    for location, _ in metadata.registered_locations:
        for filter_info in metadata.get_filter_infos(location):
            for filter_arg in filter_info.args:
                if is_tag_argument(filter_arg):
                    filter_arg_names.add(get_directive_argument_name(filter_arg))

    unused_tags = tag_names - filter_arg_names
    if unused_tags:
        raise GraphQLCompilationError(u'This GraphQL query contains @tag directives whose values '
                                      u'are not used: {}. This is not allowed. Please either use '
                                      u'them in a filter or remove them entirely.'
                                      .format(unused_tags))