@nestledjs/api 0.1.9 → 0.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestledjs/api",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "generators": "./generators.json",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -25,6 +25,6 @@
25
25
  "pg": "^8.13.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "@nestledjs/utils": "0.1.2"
28
+ "@nestledjs/utils": "0.1.3"
29
29
  }
30
30
  }
@@ -311,7 +311,6 @@ function generateIndex(): string {
311
311
  return `// Generated from Prisma schema
312
312
  export * from './models'
313
313
  export * from './enums'
314
- export * from './core-paging.model'
315
314
  `
316
315
  }
317
316
 
@@ -125,8 +125,8 @@ export class Create<%= model.modelName %>Input {
125
125
  fieldDecoratorTypeArg = `() => ${baseGqlType}`;
126
126
  }
127
127
  }
128
- // Always optional for id, createdAt, updatedAt, and virtual fields
129
- if (alwaysOptionalFields.includes(field.name) || field.isVirtual) {
128
+ // Always optional for id, createdAt, updatedAt, virtual fields, and relation fields
129
+ if (alwaysOptionalFields.includes(field.name) || field.isVirtual || field.relationName) {
130
130
  isOptional = true;
131
131
  } else {
132
132
  isOptional = field.isOptional;