@kubb/plugin-vue-query 5.1.1 → 5.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +10 -3
package/dist/index.js
CHANGED
|
@@ -1055,14 +1055,16 @@ function Mutation({ name, clientName, node, tsResolver, mutationKeyName, returnT
|
|
|
1055
1055
|
const hasMutationParams = groupedParam !== null;
|
|
1056
1056
|
const groupedParamsNode = createFunctionParameters({ params: groupedParam ? [groupedParam] : [] });
|
|
1057
1057
|
const argBindingStr = hasMutationParams ? callPrinter$1.print(groupedParamsNode) ?? "" : "";
|
|
1058
|
-
const
|
|
1058
|
+
const TRequest = resolveMutationRequestType(node, tsResolver);
|
|
1059
|
+
const mutationFnBody = buildCallResultBody(buildClientCall(node, {
|
|
1059
1060
|
clientName,
|
|
1060
|
-
signal: false
|
|
1061
|
+
signal: false,
|
|
1062
|
+
unwrapName: (name) => `toValue<${TRequest}['${name}']>(${name})`
|
|
1061
1063
|
}), { returnType });
|
|
1062
1064
|
const generics = [
|
|
1063
1065
|
TData,
|
|
1064
1066
|
TError,
|
|
1065
|
-
|
|
1067
|
+
TRequest,
|
|
1066
1068
|
"TContext"
|
|
1067
1069
|
].join(", ");
|
|
1068
1070
|
const paramsNode = buildMutationParamsNode(node, { resolver: tsResolver });
|