UNPKG

@rnga/orders

Version:

## Get schema from @prisma-cms 1. yarn get-api-schema -e http://localhost:4000 2. yarn build-api-fragments

32 lines (16 loc) 534 B
import prismaGenerateSchema from "@prisma-cms/prisma-schema"; import CoreModule from "../../modules"; import path from 'path'; import chalk from "chalk"; export const generateSchema = function (schemaType) { let result; try { const moduleURL = new URL(import.meta.url); const basedir = path.join(path.dirname(moduleURL.pathname), "/../../../", "schema/") result = prismaGenerateSchema(schemaType, new CoreModule(), basedir); } catch (error) { } return result; } export default generateSchema;