(schema: SchemaDef, type: string)
| 67 | } |
| 68 | |
| 69 | export function requireTypeDef(schema: SchemaDef, type: string) { |
| 70 | const typeDef = getTypeDef(schema, type); |
| 71 | if (!typeDef) { |
| 72 | throw createInternalError(`Type "${type}" not found in schema`, type); |
| 73 | } |
| 74 | return typeDef; |
| 75 | } |
| 76 | |
| 77 | export function getField(schema: SchemaDef, model: string, field: string) { |
| 78 | const modelDef = getModel(schema, model); |
no test coverage detected