MCPcopy
hub / github.com/subquery/subql / validateEntityName

Function validateEntityName

packages/cli/src/controller/codegen-controller.ts:295–302  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

293}
294
295export function validateEntityName(name: string): string {
296 for (const reservedKey of RESERVED_KEYS) {
297 if (name.toLowerCase().endsWith(reservedKey.toLowerCase())) {
298 throw new Error(`EntityName: ${name} cannot end with reservedKey: ${reservedKey}`);
299 }
300 }
301 return name;
302}
303// 2. Loop all entities and render it
304export async function generateModels(projectPath: string, schema: string): Promise<void> {
305 const extractEntities = getAllEntitiesRelations(schema);

Callers 2

generateModelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected