You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application interacts with an API that requires an organizationId query parameter to be passed with every request. To avoid having to pass this manually for every API request, I'm using a middleware to attach the parameter. However, this causes type errors when using the client, since the required query parameter isn't being supplied at the same place the request is being made.
Is there any way to let the client know when a request is made that the required parameter is being provided elsewhere and so avoid the type error? For example, given the above middleware, I'd like to be able to simply do this:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My application interacts with an API that requires an
organizationId
query parameter to be passed with every request. To avoid having to pass this manually for every API request, I'm using a middleware to attach the parameter. However, this causes type errors when using the client, since the required query parameter isn't being supplied at the same place the request is being made.Here's how the client is initialized:
Is there any way to let the client know when a request is made that the required parameter is being provided elsewhere and so avoid the type error? For example, given the above middleware, I'd like to be able to simply do this:
Rather than having to do this:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions