venom-generator
Version:
In the way of code generation, complete the storage model->computation model (business API) transformation to achieve the goal of design and implementation
6 lines (5 loc) • 1.22 kB
TypeScript
export declare const SCHEMACODE = "import { makePrismaSchema } from 'nexus-prisma'\nimport * as path from 'path'\nimport datamodelInfo from './nexus-prisma'\nimport { prisma } from './prisma-client'\nimport * as generatedTypes from './resolvers'\n\n// \u5224\u65AD\u662F\u5426\u963F\u91CC\u4E91\u51FD\u6570\u8BA1\u7B97\u73AF\u5883\nlet outputPath = process.env.SERVERNAME != undefined ? '/tmp/' : path.join(__dirname, './')\nexport const gSchema = makePrismaSchema({\n types: generatedTypes,\n\n prisma: {\n datamodelInfo,\n client: prisma\n },\n\n outputs: {\n schema: outputPath + 'schema.graphql',\n typegen: outputPath + 'nexus.ts'\n },\n\n nonNullDefaults: {\n input: true,\n output: true\n }\n})";
export declare function calcAuthorizationCode(againCommon: boolean, calcAuthorization: string): string;
export declare function calcAuthorizationMethodCode(checkCalcAuthorization: boolean, calcAuthorization: string, authAud: string, methodName: string): string;
export declare function schemaCode(server: string, imServer: string, typeDef: string, gSchema: string, resolver: string): string;
export declare function indexCode(server: string, poclicy: string, context: string): string;