Waveguide engineering of graphene's nonlinearity