Fetching different server url than defined in config

MMugetsu3/6/2023
Is it possible to access the reactQuery instance and fetch different server url? I would like to use reactQuery to get data from my server which is at say /address-middleware instead of hitting /trpc/.... Can I do that? I dont want to setup separate reactquery provider or something just to call one separate endpoint
Mmsalsbery3/6/2023
Yes you can use React Query
MMugetsu3/6/2023
but how I could fetch different url than the one which is defined via createTRPCReact -> /trpc
Mmsalsbery3/6/2023
A query function can fetch any way you desire. See the Tanstack Query useQuery docs for examples. On the tRPC side, everything you need to know should be here (mostly relevant is the example of getting the query client)

https://trpc.io/docs/useContext#helpers