MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / requireTypeDef

Function requireTypeDef

packages/orm/src/client/query-utils.ts:69–75  ·  view source on GitHub ↗
(schema: SchemaDef, type: string)

Source from the content-addressed store, hash-verified

67}
68
69export 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
77export function getField(schema: SchemaDef, model: string, field: string) {
78 const modelDef = getModel(schema, model);

Callers 1

Calls 2

createInternalErrorFunction · 0.90
getTypeDefFunction · 0.70

Tested by

no test coverage detected