We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b5f372 commit 785c03cCopy full SHA for 785c03c
gen/util.ts
@@ -85,11 +85,11 @@ function addExtraReturnsToOperation(operation: Schema.Operation): Schema.Operati
85
*/
86
export function replaceModelTypes(schema: Schema, config: Config): Schema {
87
for (const modelID in schema.models) {
88
- const model = schema.models[modelID];
+ const model = schema.models[modelID]!;
89
for (const fieldID in model.fields) {
90
- const field = model.fields[fieldID];
+ const field = model.fields[fieldID]!;
91
if (schema.models.find(m => m.name === field.type))
92
- schema.models[modelID].fields[fieldID].type = `${config.name}.${field.type}`;
+ schema.models[modelID]!.fields[fieldID]!.type = `${config.name}.${field.type}`;
93
}
94
95
return schema;
0 commit comments