<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vertex_field_only(operator):
 """Ensure the filter function is only applied to vertex field types."""

    def decorator(f):
        """Decorate the supplied function with the "vertex_field_only" logic."""
        @wraps(f)
        def wrapper(filter_operation_info, context, parameters, *args, **kwargs):
            """Check that the type on which the operator operates is a vertex field type."""
            if 'operator' in kwargs:
                current_operator = kwargs['operator']
            else:
                # Because "operator" is from an enclosing scope, it is immutable in Python 2.x.
                current_operator = operator

            if not is_vertex_field_type(filter_operation_info.field_type):
                raise GraphQLCompilationError(
                    u'Cannot apply "{}" filter to non-vertex field: '
                    u'{}'.format(current_operator, filter_operation_info.field_name))
            return f(filter_operation_info, context, parameters, *args, **kwargs)

        return wrapper

    return decorator