MCPcopy
hub / github.com/redwoodjs/graphql / getModelNames

Function getModelNames

packages/auth-providers/dbAuth/setup/src/shared.ts:16–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14)
15
16export const getModelNames = async () => {
17 const datamodel = await getSchema(getPaths().api.dbSchema)
18 const schema = await getDMMF({ datamodel })
19
20 return schema.datamodel.models.map((model) => model.name)
21}
22
23export const hasModel = async (name: string) => {
24 if (!name) {

Callers 2

shouldCreateUserModelFunction · 0.90
hasModelFunction · 0.70

Calls 2

getPathsFunction · 0.90
getSchemaFunction · 0.85

Tested by

no test coverage detected