but in my case I want to fetch once an action happens and pass in an argument that I get once user submits something. What is the best way to go about this?
The hooks provided by @trpc/react-query are a thin wrapper around @tanstack/react-query. For in-depth information about options and usage patterns, refer to their docs on mutations.