@prisma/param-graph-builder 7.3.0-integration-parameterization.8 → 7.3.0-integration-parameterization.9

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.
@@ -273,7 +273,9 @@ function buildParamGraph(dmmf) {
273
273
  }
274
274
  break;
275
275
  case "inputObjectTypes":
276
- if (!inputObjectTypes.some((ot) => ot.type === inputType.type && ot.namespace === inputType.namespace)) {
276
+ if (!inputObjectTypes.some(
277
+ (ot) => ot.type === inputType.type && ot.namespace === inputType.namespace && ot.isList === inputType.isList
278
+ )) {
277
279
  inputObjectTypes.push(inputType);
278
280
  }
279
281
  break;
@@ -305,9 +307,11 @@ function buildParamGraph(dmmf) {
305
307
  }
306
308
  if (inputObjectTypes.length > 0) {
307
309
  const hasObjectList = inputObjectTypes.some((iot) => iot.isList);
310
+ const hasSingleObject = inputObjectTypes.some((iot) => !iot.isList);
308
311
  if (hasObjectList) {
309
312
  flags |= import_param_graph.EdgeFlag.ListObject;
310
- } else {
313
+ }
314
+ if (hasSingleObject) {
311
315
  flags |= import_param_graph.EdgeFlag.Object;
312
316
  }
313
317
  if (inputObjectTypes.length === 1) {
@@ -253,7 +253,9 @@ function buildParamGraph(dmmf) {
253
253
  }
254
254
  break;
255
255
  case "inputObjectTypes":
256
- if (!inputObjectTypes.some((ot) => ot.type === inputType.type && ot.namespace === inputType.namespace)) {
256
+ if (!inputObjectTypes.some(
257
+ (ot) => ot.type === inputType.type && ot.namespace === inputType.namespace && ot.isList === inputType.isList
258
+ )) {
257
259
  inputObjectTypes.push(inputType);
258
260
  }
259
261
  break;
@@ -285,9 +287,11 @@ function buildParamGraph(dmmf) {
285
287
  }
286
288
  if (inputObjectTypes.length > 0) {
287
289
  const hasObjectList = inputObjectTypes.some((iot) => iot.isList);
290
+ const hasSingleObject = inputObjectTypes.some((iot) => !iot.isList);
288
291
  if (hasObjectList) {
289
292
  flags |= EdgeFlag.ListObject;
290
- } else {
293
+ }
294
+ if (hasSingleObject) {
291
295
  flags |= EdgeFlag.Object;
292
296
  }
293
297
  if (inputObjectTypes.length === 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/param-graph-builder",
3
- "version": "7.3.0-integration-parameterization.8",
3
+ "version": "7.3.0-integration-parameterization.9",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@prisma/dmmf": "7.3.0-integration-parameterization.8",
28
- "@prisma/param-graph": "7.3.0-integration-parameterization.8"
27
+ "@prisma/param-graph": "7.3.0-integration-parameterization.9",
28
+ "@prisma/dmmf": "7.3.0-integration-parameterization.9"
29
29
  },
30
30
  "files": [
31
31
  "dist"