Skip to content

Commit 7577b72

Browse files
committed
refactor(query): update handleIllegal logic in serviceFunctionIdentifier
1 parent 40d6e90 commit 7577b72

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export const createInfiniteQueryOptions = ({
315315

316316
const functionName = serviceFunctionIdentifier({
317317
config: plugin.context.config,
318-
handleIllegal: true,
318+
handleIllegal: !plugin.getPlugin('@hey-api/sdk')?.config.asClass,
319319
id: operation.id,
320320
operation,
321321
});

packages/openapi-ts/src/plugins/@tanstack/query-core/mutationOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const createMutationOptions = ({
105105
// Get the function name from SDK plugin instead of using operation.id directly
106106
const functionName = serviceFunctionIdentifier({
107107
config: plugin.context.config,
108-
handleIllegal: true,
108+
handleIllegal: !plugin.getPlugin('@hey-api/sdk')?.config.asClass,
109109
id: operation.id,
110110
operation,
111111
});

packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export const queryKeyStatement = ({
311311
// Get the function name from SDK plugin instead of using operation.id directly
312312
const functionName = serviceFunctionIdentifier({
313313
config: plugin.context.config,
314-
handleIllegal: true,
314+
handleIllegal: !plugin.getPlugin('@hey-api/sdk')?.config.asClass,
315315
id: operation.id,
316316
operation,
317317
});

packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const createQueryOptions = ({
7272
// Get the function name from SDK plugin instead of using operation.id directly
7373
const functionName = serviceFunctionIdentifier({
7474
config: plugin.context.config,
75-
handleIllegal: true,
75+
handleIllegal: !plugin.getPlugin('@hey-api/sdk')?.config.asClass,
7676
id: operation.id,
7777
operation,
7878
});

0 commit comments

Comments
 (0)