@kubb/plugin-vue-query 5.1.2 → 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 +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1085,14 +1085,16 @@ function Mutation({ name, clientName, node, tsResolver, mutationKeyName, returnT
|
|
|
1085
1085
|
const hasMutationParams = groupedParam !== null;
|
|
1086
1086
|
const groupedParamsNode = (0, _kubb_plugin_ts.createFunctionParameters)({ params: groupedParam ? [groupedParam] : [] });
|
|
1087
1087
|
const argBindingStr = hasMutationParams ? callPrinter$1.print(groupedParamsNode) ?? "" : "";
|
|
1088
|
-
const
|
|
1088
|
+
const TRequest = resolveMutationRequestType(node, tsResolver);
|
|
1089
|
+
const mutationFnBody = buildCallResultBody(buildClientCall(node, {
|
|
1089
1090
|
clientName,
|
|
1090
|
-
signal: false
|
|
1091
|
+
signal: false,
|
|
1092
|
+
unwrapName: (name) => `toValue<${TRequest}['${name}']>(${name})`
|
|
1091
1093
|
}), { returnType });
|
|
1092
1094
|
const generics = [
|
|
1093
1095
|
TData,
|
|
1094
1096
|
TError,
|
|
1095
|
-
|
|
1097
|
+
TRequest,
|
|
1096
1098
|
"TContext"
|
|
1097
1099
|
].join(", ");
|
|
1098
1100
|
const paramsNode = buildMutationParamsNode(node, { resolver: tsResolver });
|