How do I wait for a value before executing a query? - tRPC