Get auth token from context when defining httpBatchLink
Im setting up an ApiProvider for react query and I want to get the authorization token for the Authorization header from trpc context since my session is stored there.
My api is defined here
And this is the definition of my apiProvider
Is there any way to pass the context to the createClient function? or al least just get the context in any way so I can assign the token value to the one in context
0 Replies