Is there way to use one useMutation hook for all my mutations?

Hi community,

I want to make a gateway for all my mutations and use one useMutation hook instead of have multiple useMutations in the app. I know can alias the mutation function like this
const [mutationFunc, { loading, error }] = useMutation(S3_GET_URL)

I would like to conditionally change the schema name S3_GET_URL by putting it in a state.

Is there a way to do this?

Thanks.