Skip to content

Commit 13cdd90

Browse files
committed
fix(pinia-colada): restore query context propagation
1 parent fc74f17 commit 13cdd90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/openapi-ts/src/plugins/@pinia/colada/queryOptions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import type { PluginState } from './state';
1414
import type { PiniaColadaPlugin } from './types';
1515
import { useTypeData } from './useType';
1616
import { getPublicTypeData } from './utils';
17+
1718
const optionsParamName = 'options';
19+
const fnOptions = 'context';
1820

1921
export const createQueryOptions = ({
2022
operation,
@@ -73,6 +75,7 @@ export const createQueryOptions = ({
7375
multiLine: true,
7476
obj: [
7577
{ spread: optionsParamName },
78+
{ spread: fnOptions },
7679
{ key: 'throwOnError', value: true },
7780
],
7881
}),
@@ -113,7 +116,7 @@ export const createQueryOptions = ({
113116
value: tsc.arrowFunction({
114117
async: true,
115118
multiLine: true,
116-
parameters: [],
119+
parameters: [{ name: fnOptions }],
117120
statements,
118121
}),
119122
},

0 commit comments

Comments
 (0)