-
-
Notifications
You must be signed in to change notification settings - Fork 319
Closed
Labels
bug 🔥Broken or incorrect behavior.Broken or incorrect behavior.important 📌This issue is important and will be addressed when capacity allows.This issue is important and will be addressed when capacity allows.
Description
Description
The problem lies here:
https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/%40tanstack/query-core/plugin.ts#L118
In the below line of generated code, baseUrl is set to client.getConfig().baseUrl, using the global client variable.
const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: client.getConfig().baseUrl } as QueryKey<TOptions>[0];
This should instead be something like:
const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];
which pulls the baseUrl from options.client, if present.
Reproducible example or configuration
No response
OpenAPI specification (optional)
No response
System information (optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug 🔥Broken or incorrect behavior.Broken or incorrect behavior.important 📌This issue is important and will be addressed when capacity allows.This issue is important and will be addressed when capacity allows.