@technicity/data-service-generator 0.12.1 → 0.12.2

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.
@@ -195,11 +195,11 @@ async function getSDKSource(input, specialCaseUuidColumn, supplementClientOpts)
195
195
  return `type TNullResponses = { ${Object.entries(_.groupBy((x) => x.table, input))
196
196
  .flatMap(([table, xx]) => {
197
197
  const name = table;
198
- return (`${name}: {` +
198
+ return (`${name}?: {` +
199
199
  xx
200
200
  .map(({ kind }) => {
201
201
  const operation = mapKindToAction(kind);
202
- return `${operation}: (input: { args: { select: Fields${table} | undefined, where: Where${table} | undefined }, model: "${table}", operation: "${operation}" }) => Promise<ReturnBase${table}>`;
202
+ return `${operation}?: (input: { args: { select: Fields${table} | undefined, where: Where${table} | undefined }, model: "${table}", operation: "${operation}" }) => Promise<ReturnBase${table}>`;
203
203
  })
204
204
  .join(",") +
205
205
  " } ");
@@ -35,6 +35,9 @@ async function resolve(input, dbCall, formatQuery, beginTransaction, dialect, mi
35
35
  return nextMiddleware(paramsMaybeMutated, consumer);
36
36
  }
37
37
  const paramsChanged = { ...input, ...params };
38
+ if (paramsChanged?.nullability) {
39
+ return _nullResolve(paramsChanged);
40
+ }
38
41
  return _resolve(paramsChanged, dbCall, formatQuery, beginTransaction, dialect, context, cache);
39
42
  };
40
43
  return resource.runInAsyncScope(() => consumer(params));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technicity/data-service-generator",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist"