@kubb/plugin-react-query 5.1.0-canary.20260902T141307 → 5.1.0-canary.20260902T190829

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 CHANGED
@@ -743,12 +743,11 @@ function InfiniteQueryOptions({ name, clientName, initialPageParam, cursorParam,
743
743
  memberTypeWrapper
744
744
  });
745
745
  const paramsSignature = declarationPrinter$7.print(paramsNode) ?? "";
746
- const queryFnBody = `const { data } = await ${buildClientCall(node, {
746
+ const queryFnBody = `return ${buildClientCall(node, {
747
747
  clientName,
748
748
  signal: true,
749
749
  unwrapName
750
- })}
751
- return data`;
750
+ })}.unwrap()`;
752
751
  const hasNewParams = nextParam != null || previousParam != null;
753
752
  const [getNextPageParamExpr, getPreviousPageParamExpr] = (() => {
754
753
  if (hasNewParams) {
@@ -1286,11 +1285,10 @@ function MutationOptions({ name, clientName, node, tsResolver, mutationKeyName }
1286
1285
  const groupedParamsNode = (0, _kubb_plugin_ts.createFunctionParameters)({ params: groupedParam ? [groupedParam] : [] });
1287
1286
  const TRequest = hasMutationParams ? tsResolver.response.options(node) : "undefined";
1288
1287
  const argBindingStr = hasMutationParams ? callPrinter$2.print(groupedParamsNode) ?? "" : "_";
1289
- const mutationFnBody = `const { data } = await ${buildClientCall(node, {
1288
+ const mutationFnBody = `return ${buildClientCall(node, {
1290
1289
  clientName,
1291
1290
  signal: false
1292
- })}
1293
- return data`;
1291
+ })}.unwrap()`;
1294
1292
  return /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Source, {
1295
1293
  name,
1296
1294
  isExportable: true,
@@ -1464,11 +1462,10 @@ function QueryOptions({ name, clientName, node, tsResolver, queryKeyName }) {
1464
1462
  const queryKeyParamsCall = callPrinter.print(queryKeyParamsNode) ?? "";
1465
1463
  const paramsNode = buildQueryOptionsParams(node, { resolver: tsResolver });
1466
1464
  const paramsSignature = declarationPrinter.print(paramsNode) ?? "";
1467
- const queryFnBody = `const { data } = await ${buildClientCall(node, {
1465
+ const queryFnBody = `return ${buildClientCall(node, {
1468
1466
  clientName,
1469
1467
  signal: true
1470
- })}
1471
- return data`;
1468
+ })}.unwrap()`;
1472
1469
  return /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Source, {
1473
1470
  name,
1474
1471
  isExportable: true,