def mutation_jwt_refresh_token_required(fn):
    """
    A decorator to protect a mutation.

    If you decorate anmutation with this, it will ensure that the requester
    has a valid refresh token before allowing the mutation to be called.
    """
    @wraps(fn)
    def wrapper(cls, *args, **kwargs):
        token = kwargs.pop(current_app.config['JWT_REFRESH_TOKEN_ARGUMENT_NAME'])
        try:
            verify_refresh_jwt_in_argument(token)
        except Exception as e:
            return cls(AuthInfoField(message=str(e)))

        return fn(*args, **kwargs)
    return wrapper
A decorator to protect a mutation.

    If you decorate anmutation with this, it will ensure that the requester
    has a valid refresh token before allowing the mutation to be called.