(schema: SchemaDef, model: string)
| 59 | } |
| 60 | |
| 61 | export function requireModel(schema: SchemaDef, model: string) { |
| 62 | const modelDef = getModel(schema, model); |
| 63 | if (!modelDef) { |
| 64 | throw createInternalError(`Model "${model}" not found in schema`, model); |
| 65 | } |
| 66 | return modelDef; |
| 67 | } |
| 68 | |
| 69 | export function requireTypeDef(schema: SchemaDef, type: string) { |
| 70 | const typeDef = getTypeDef(schema, type); |
no test coverage detected