@memberjunction/codegen-lib 2.13.0 → 2.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,546 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.GraphQLServerGeneratorBase = void 0;
13
- const core_1 = require("@memberjunction/core");
14
- const fs_1 = __importDefault(require("fs"));
15
- const path_1 = __importDefault(require("path"));
16
- const logging_1 = require("./Misc/logging");
17
- const config_1 = require("./Config/config");
18
- const util_1 = require("./Misc/util");
19
- const global_1 = require("@memberjunction/global");
20
- /**
21
- * This class is responsible for generating the GraphQL Server resolvers and types for the entities, you can sub-class this class to extend/modify the logic, make sure to use @memberjunction/global RegisterClass decorator
22
- * so that your class is used.
23
- */
24
- let GraphQLServerGeneratorBase = class GraphQLServerGeneratorBase {
25
- constructor() {
26
- this._graphQLTypeSuffix = '_';
27
- }
28
- generateGraphQLServerCode(entities, outputDirectory, generatedEntitiesImportLibrary, excludeRelatedEntitiesExternalToSchema) {
29
- const isInternal = generatedEntitiesImportLibrary.trim().toLowerCase().startsWith('@memberjunction/');
30
- let sRet = '';
31
- try {
32
- sRet = this.generateAllEntitiesServerFileHeader(entities, generatedEntitiesImportLibrary, isInternal);
33
- for (let i = 0; i < entities.length; ++i) {
34
- sRet += this.generateServerEntityString(entities[i], false, generatedEntitiesImportLibrary, excludeRelatedEntitiesExternalToSchema);
35
- }
36
- (0, util_1.makeDir)(outputDirectory);
37
- fs_1.default.writeFileSync(path_1.default.join(outputDirectory, 'generated.ts'), sRet);
38
- return true;
39
- }
40
- catch (err) {
41
- (0, logging_1.logError)(err);
42
- return false;
43
- }
44
- }
45
- /**
46
- * The suffix to append to the GraphQL Type name, default is an underscore, override this property in your sub-class to change the suffix
47
- */
48
- get GraphQLTypeSuffix() {
49
- return this._graphQLTypeSuffix;
50
- }
51
- generateServerEntityString(entity, includeFileHeader, generatedEntitiesImportLibrary, excludeRelatedEntitiesExternalToSchema) {
52
- const isInternal = generatedEntitiesImportLibrary.trim().toLowerCase() === '@memberjunction/core-entities';
53
- let sEntityOutput = '';
54
- try {
55
- const md = new core_1.Metadata();
56
- const fields = entity.Fields;
57
- const serverGraphQLTypeName = entity.ClassName + this.GraphQLTypeSuffix;
58
- if (includeFileHeader)
59
- sEntityOutput = this.generateEntitySpecificServerFileHeader(entity, generatedEntitiesImportLibrary, excludeRelatedEntitiesExternalToSchema);
60
- sEntityOutput += this.generateServerEntityHeader(entity, serverGraphQLTypeName);
61
- // now generate the fields by looping through the fields collection from the database
62
- for (let j = 0; j < fields.length; ++j) {
63
- sEntityOutput += this.generateServerField(fields[j]);
64
- }
65
- for (let j = 0; j < entity.RelatedEntities.length; ++j) {
66
- const r = entity.RelatedEntities[j];
67
- const re = md.Entities.find((e) => e.Name.toLowerCase() === r.RelatedEntity.toLowerCase());
68
- // only include the relationship if we are IncludeInAPI for the related entity
69
- if (re.IncludeInAPI) {
70
- if (!excludeRelatedEntitiesExternalToSchema || re.SchemaName === entity.SchemaName) {
71
- // only include the relationship if either we are NOT excluding related entities external to the schema
72
- // or if the related entity is in the same schema as the current entity
73
- sEntityOutput += this.generateServerRelationship(md, entity.RelatedEntities[j], isInternal);
74
- }
75
- }
76
- else {
77
- sEntityOutput += `// Relationship to ${r.RelatedEntity} is not included in the API because it is not marked as IncludeInAPI\n`;
78
- }
79
- }
80
- // finally, close it up with the footer
81
- sEntityOutput += this.generateServerEntityFooter(entity);
82
- sEntityOutput += this.generateServerGraphQLResolver(entity, serverGraphQLTypeName, excludeRelatedEntitiesExternalToSchema, isInternal);
83
- }
84
- catch (err) {
85
- (0, logging_1.logError)(err);
86
- }
87
- finally {
88
- return sEntityOutput;
89
- }
90
- }
91
- generateAllEntitiesServerFileHeader(entities, importLibrary, isInternal) {
92
- let sRet = `/********************************************************************************
93
- * ALL ENTITIES - TypeGraphQL Type Class Definition - AUTO GENERATED FILE
94
- * Generated Entities and Resolvers for Server
95
- *
96
- * GENERATED: ${new Date().toLocaleString()}
97
- *
98
- * >>> DO NOT MODIFY THIS FILE!!!!!!!!!!!!
99
- * >>> YOUR CHANGES WILL BE OVERWRITTEN
100
- * >>> THE NEXT TIME THIS FILE IS GENERATED
101
- *
102
- **********************************************************************************/
103
- import { Arg, Ctx, Int, Query, Resolver, Field, Float, ObjectType, FieldResolver, Root, InputType, Mutation,
104
- PubSub, PubSubEngine, ResolverBase, RunViewByIDInput, RunViewByNameInput, RunDynamicViewInput,
105
- AppContext, KeyValuePairInput, DeleteOptionsInput } from '@memberjunction/server';
106
- import { Metadata, EntityPermissionType, CompositeKey } from '@memberjunction/core'
107
-
108
- import { MaxLength } from 'class-validator';
109
- import { DataSource } from 'typeorm';
110
- ${isInternal
111
- ? `import { mj_core_schema } from '../config.js';\n`
112
- : `import * as mj_core_schema_server_object_types from '@memberjunction/server'`}
113
-
114
-
115
- ${entities.length > 0 ? `import { ${entities.map((e) => `${e.ClassName}Entity`).join(', ')} } from '${importLibrary}';` : `export {}`}
116
- `;
117
- return sRet;
118
- }
119
- generateEntitySpecificServerFileHeader(entity, importLibrary, excludeRelatedEntitiesExternalToSchema) {
120
- const md = new core_1.Metadata();
121
- let sRet = `/********************************************************************************
122
- * ${entity.Name} TypeORM/TypeGraphQL Type Class Definition - AUTO GENERATED FILE
123
- *
124
- * GENERATED: ${new Date().toLocaleString()}
125
- *
126
- * >>> DO NOT MODIFY THIS FILE!!!!!!!!!!!!
127
- * >>> YOUR CHANGES WILL BE OVERWRITTEN
128
- * >>> THE NEXT TIME THIS FILE IS GENERATED
129
- *
130
- **********************************************************************************/
131
- import { MaxLength } from 'class-validator';
132
- import { Field, ${entity._floatCount > 0 ? 'Float, ' : ''}Int, ObjectType } from '@memberjunction/server';
133
- import { ${`${entity.ClassName}Entity`} } from '${importLibrary}';
134
- `;
135
- for (let i = 0; i < entity.RelatedEntities.length; ++i) {
136
- const r = entity.RelatedEntities[i];
137
- const re = md.Entities.find((e) => e.Name.toLowerCase() == r.RelatedEntity.toLowerCase());
138
- if (!excludeRelatedEntitiesExternalToSchema || re.SchemaName === entity.SchemaName) {
139
- // we only include entities that are in the same schema as the current entity
140
- // OR if we are not excluding related entities external to the schema
141
- const tableName = entity.RelatedEntities[i].RelatedEntityBaseTableCodeName;
142
- sRet += `\nimport ${tableName} from './${tableName}';`;
143
- }
144
- }
145
- return sRet;
146
- }
147
- generateServerEntityHeader(entity, serverGraphQLTypeName) {
148
- let sDescription = entity.Description?.trim().length > 0 ? entity.Description : '';
149
- if (sDescription.includes("'"))
150
- sDescription = sDescription.replace(/'/g, "\\'");
151
- return `
152
-
153
- //****************************************************************************
154
- // ENTITY CLASS for ${entity.Name}
155
- //****************************************************************************
156
- @ObjectType(${sDescription.length > 0 ? `{ description: '${sDescription}' }` : ''})
157
- export class ${serverGraphQLTypeName} {`;
158
- }
159
- generateServerEntityFooter(entity) {
160
- if (!entity)
161
- (0, logging_1.logError)('entity parameter must be passed in to generateServerEntityFooter()');
162
- return `\n}`;
163
- }
164
- generateServerField(fieldInfo) {
165
- const fieldString = this.getTypeGraphQLFieldString(fieldInfo);
166
- // use a special codename for graphql because if we start with __mj we will replace with _mj_ as we can't start with __ it has meaning in graphql
167
- const codeName = fieldInfo.CodeName.startsWith('__mj') ? '_mj_' + fieldInfo.CodeName.substring(4) : fieldInfo.CodeName;
168
- let fieldOptions = '';
169
- if (fieldInfo.AllowsNull)
170
- fieldOptions += 'nullable: true';
171
- if (fieldInfo.Description !== null && fieldInfo.Description.trim().length > 0)
172
- fieldOptions += (fieldOptions.length > 0 ? ', ' : '') + `description: '${fieldInfo.Description.replace(/'/g, "\\'")}'`;
173
- return `
174
- @Field(${fieldString}${fieldOptions.length > 0 ? (fieldString == '' ? '' : ', ') + `{${fieldOptions}}` : ''}) ${fieldInfo.Length > 0 && fieldString == '' /*string*/ ? '\n @MaxLength(' + fieldInfo.Length + ')' : ''}
175
- ${codeName}${fieldInfo.AllowsNull ? '?' : ''}: ${(0, core_1.TypeScriptTypeFromSQLType)(fieldInfo.Type)};
176
- `;
177
- }
178
- getTypeGraphQLFieldString(fieldInfo) {
179
- switch (fieldInfo.Type.toLowerCase()) {
180
- case 'text':
181
- case 'char':
182
- case 'varchar':
183
- case 'ntext':
184
- case 'nchar':
185
- case 'nvarchar':
186
- case 'uniqueidentifier': //treat this as a string
187
- return '';
188
- case 'datetime':
189
- case 'datetimeoffset':
190
- case 'date':
191
- case 'time':
192
- return '';
193
- case 'bit':
194
- return '() => Boolean';
195
- case 'decimal':
196
- case 'numeric':
197
- case 'float':
198
- case 'real':
199
- case 'money':
200
- case 'smallmoney':
201
- fieldInfo.IsFloat = true; // used by calling functions to determine if we need to import Float
202
- return '() => Float';
203
- case 'timestamp':
204
- case 'rowversion':
205
- return '';
206
- default:
207
- return '() => Int';
208
- }
209
- }
210
- generateServerRelationship(md, r, isInternal) {
211
- const re = md.Entities.find((e) => e.Name.toLowerCase() === r.RelatedEntity.toLowerCase());
212
- const classPackagePrefix = re.SchemaName === config_1.mjCoreSchema && !isInternal ? 'mj_core_schema_server_object_types.' : '';
213
- const relatedClassName = classPackagePrefix + r.RelatedEntityBaseTableCodeName;
214
- // create a code name that is the combination of the relatedentitycode name plus the relatedentityjoinfield that has spaces stripped
215
- // and replace all special characters with an underscore
216
- const uniqueCodeName = `${r.RelatedEntityCodeName}_${r.RelatedEntityJoinField.replace(/ /g, '')}`.replace(/[^a-zA-Z0-9]/g, '_');
217
- if (r.Type.toLowerCase().trim() == 'one to many') {
218
- return `
219
- @Field(() => [${relatedClassName + this.GraphQLTypeSuffix}])
220
- ${uniqueCodeName}Array: ${relatedClassName + this.GraphQLTypeSuffix}[]; // Link to ${r.RelatedEntityCodeName}
221
- `;
222
- }
223
- else {
224
- // many to many
225
- return `
226
- @Field(() => [${relatedClassName + this.GraphQLTypeSuffix}])
227
- ${uniqueCodeName}Array: ${relatedClassName + this.GraphQLTypeSuffix}[]; // Link to ${r.RelatedEntity}
228
- `;
229
- }
230
- }
231
- generateServerGraphQLResolver(entity, serverGraphQLTypeName, excludeRelatedEntitiesExternalToSchema, isInternal) {
232
- const md = new core_1.Metadata();
233
- let sRet = '';
234
- // we only generate resolvers for entities that have a primary key field
235
- if (entity.PrimaryKeys.length > 0) {
236
- // first add in the base resolver query to lookup by ID for all entities
237
- const auditAccessCode = entity.AuditRecordAccess
238
- ? `
239
- this.createRecordAccessAuditLogRecord(userPayload, '${entity.Name}', ${entity.FirstPrimaryKey.Name})`
240
- : '';
241
- sRet = `
242
- //****************************************************************************
243
- // RESOLVER for ${entity.Name}
244
- //****************************************************************************
245
- @ObjectType()
246
- export class Run${entity.BaseTableCodeName}ViewResult {
247
- @Field(() => [${serverGraphQLTypeName}])
248
- Results: ${serverGraphQLTypeName}[];
249
-
250
- @Field(() => String, {nullable: true})
251
- UserViewRunID?: string;
252
-
253
- @Field(() => Int, {nullable: true})
254
- RowCount: number;
255
-
256
- @Field(() => Int, {nullable: true})
257
- TotalRowCount: number;
258
-
259
- @Field(() => Int, {nullable: true})
260
- ExecutionTime: number;
261
-
262
- @Field({nullable: true})
263
- ErrorMessage?: string;
264
-
265
- @Field(() => Boolean, {nullable: false})
266
- Success: boolean;
267
- }
268
-
269
- @Resolver(${serverGraphQLTypeName})
270
- export class ${entity.BaseTableCodeName}Resolver${entity.CustomResolverAPI ? 'Base' : ''} extends ResolverBase {
271
- @Query(() => Run${entity.BaseTableCodeName}ViewResult)
272
- async Run${entity.BaseTableCodeName}ViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
273
- return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
274
- }
275
-
276
- @Query(() => Run${entity.BaseTableCodeName}ViewResult)
277
- async Run${entity.BaseTableCodeName}ViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
278
- return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
279
- }
280
-
281
- @Query(() => Run${entity.BaseTableCodeName}ViewResult)
282
- async Run${entity.BaseTableCodeName}DynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
283
- input.EntityName = '${entity.Name}';
284
- return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
285
- }`;
286
- let graphQLPKEYArgs = '';
287
- let whereClause = '';
288
- for (let i = 0; i < entity.PrimaryKeys.length; i++) {
289
- const pk = entity.PrimaryKeys[i];
290
- const idQuotes = pk.NeedsQuotes ? "'" : '';
291
- graphQLPKEYArgs += graphQLPKEYArgs.length > 0 ? ', ' : '';
292
- graphQLPKEYArgs += `@Arg('${pk.CodeName}', () => ${pk.GraphQLType}) `;
293
- graphQLPKEYArgs += `${pk.CodeName}: ${pk.TSType}`;
294
- whereClause += whereClause.length > 0 ? ' AND ' : '';
295
- whereClause += `[${pk.CodeName}]=${idQuotes}\${${pk.CodeName}}${idQuotes}`;
296
- }
297
- sRet += `
298
- @Query(() => ${serverGraphQLTypeName}, { nullable: true })
299
- async ${entity.BaseTableCodeName}(${graphQLPKEYArgs}, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<${serverGraphQLTypeName} | null> {
300
- this.CheckUserReadPermissions('${entity.Name}', userPayload);
301
- const sSQL = \`SELECT * FROM [${this.schemaName(entity)}].[${entity.BaseView}] WHERE ${whereClause} \` + this.getRowLevelSecurityWhereClause('${entity.Name}', userPayload, EntityPermissionType.Read, 'AND');${auditAccessCode}
302
- const result = this.MapFieldNamesToCodeNames('${entity.Name}', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
303
- return result;
304
- }
305
- `;
306
- if (entity.AllowAllRowsAPI) {
307
- // this entity allows a query to return all rows, so include that type of query next
308
- sRet += `
309
- @Query(() => [${serverGraphQLTypeName}])
310
- async All${entity.CodeName}(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
311
- this.CheckUserReadPermissions('${entity.Name}', userPayload);
312
- const sSQL = \`SELECT * FROM [${this.schemaName(entity)}].[${entity.BaseView}]\` + this.getRowLevelSecurityWhereClause('${entity.Name}', userPayload, EntityPermissionType.Read, ' WHERE');
313
- const result = this.ArrayMapFieldNamesToCodeNames('${entity.Name}', await dataSource.query(sSQL));
314
- return result;
315
- }
316
- `;
317
- }
318
- // now, generate the FieldResolvers for each of the one-to-many relationships
319
- for (let i = 0; i < entity.RelatedEntities.length; i++) {
320
- const r = entity.RelatedEntities[i];
321
- const re = md.Entities.find((e) => e.Name.toLowerCase() === r.RelatedEntity.toLowerCase());
322
- // only include the relationship if we are IncludeInAPI for the related entity
323
- if (re.IncludeInAPI) {
324
- if (!excludeRelatedEntitiesExternalToSchema || re.SchemaName === entity.SchemaName) {
325
- // only include the relationship if either we are NOT excluding related entities external to the schema
326
- // or if the related entity is in the same schema as the current entity
327
- if (r.Type.toLowerCase().trim() == 'many to many')
328
- sRet += this.generateManyToManyFieldResolver(entity, r);
329
- else
330
- sRet += this.generateOneToManyFieldResolver(entity, r, isInternal);
331
- }
332
- }
333
- else {
334
- sRet += `// Relationship to ${r.RelatedEntity} is not included in the API because it is not marked as IncludeInAPI\n`;
335
- }
336
- }
337
- // now do the mutations
338
- const sInputType = this.generateServerGraphQLInputType(entity);
339
- if (sInputType !== '') {
340
- // only generate mutations if we have input type, because otherwsie we don't need em
341
- sRet += this.generateServerGraphQLMutations(entity, serverGraphQLTypeName);
342
- }
343
- sRet += `\n}`;
344
- if (sInputType !== '') {
345
- sRet = sInputType + sRet; // put the input type before the resolver as the decorators have to be evaluated ahead of their use in the resolver
346
- }
347
- }
348
- return sRet;
349
- }
350
- schemaName(entity) {
351
- if (entity.SchemaName === config_1.mjCoreSchema) {
352
- return '${Metadata.Provider.ConfigData.MJCoreSchemaName}';
353
- }
354
- else
355
- return entity.SchemaName; // put the actual schema name in
356
- }
357
- generateServerGraphQLInputType(entity) {
358
- let sRet = '';
359
- if (entity.AllowCreateAPI)
360
- sRet += this.generateServerGraphQLInputTypeInner(entity, false, 'Create');
361
- if (entity.AllowUpdateAPI)
362
- sRet += this.generateServerGraphQLInputTypeInner(entity, true, 'Update');
363
- return sRet;
364
- }
365
- generateServerGraphQLInputTypeInner(entity, isUpdate, classPrefix) {
366
- let sRet = '';
367
- sRet += `\n
368
- //****************************************************************************
369
- // INPUT TYPE for ${entity.Name}
370
- //****************************************************************************
371
- @InputType()
372
- export class ${classPrefix}${entity.BaseTableCodeName}Input {`;
373
- for (let i = 0; i < entity.Fields.length; i++) {
374
- const f = entity.Fields[i];
375
- const sTypeGraphQLString = this.getTypeGraphQLFieldString(f);
376
- // use a special codename for graphql because if we start with __mj we will replace with _mj_ as we can't start with __ it has meaning in graphql
377
- const codeName = f.CodeName.startsWith('__mj') ? '_mj_' + f.CodeName.substring(4) : f.CodeName;
378
- const sNull = f.AllowsNull ? '{ nullable: true }' : '';
379
- const sFullTypeGraphQLString = sTypeGraphQLString + (sNull === '' || sTypeGraphQLString === '' ? '' : ', ') + sNull;
380
- // always include ID becuase it is used for UPDATES
381
- const includePrimaryKey = isUpdate || (!f.AutoIncrement && f.Type !== 'uniqueidentifier'); // include primary key for updates and also for creates if it is not an autoincrement field or a uniqueidentifier
382
- if ((includePrimaryKey && f.IsPrimaryKey) || !f.ReadOnly) {
383
- sRet += `
384
- @Field(${sFullTypeGraphQLString})
385
- ${codeName}${f.AllowsNull ? '?' : ''}: ${(0, core_1.TypeScriptTypeFromSQLType)(f.Type)};
386
- `;
387
- }
388
- }
389
- // if the classPrefix is UPDATE, we need to add an optional OldValues array which will simply be an array of
390
- // KeyValuePairInputs that can be used to pass in the old values for all fields
391
- if (classPrefix.trim().toLowerCase() === 'update') {
392
- sRet += `
393
- @Field(() => [KeyValuePairInput], { nullable: true })
394
- OldValues___?: KeyValuePairInput[];
395
- `;
396
- }
397
- sRet += `}
398
- `;
399
- return sRet;
400
- }
401
- generateServerGraphQLMutations(entity, serverGraphQLTypeName) {
402
- let sRet = '';
403
- // MUTATIONS
404
- // First, determine if the entity has either Create/Edit allowed, if either, we need to generate a InputType
405
- if (entity.AllowCreateAPI && !entity.VirtualEntity) {
406
- // generate a create mutation
407
- sRet += `
408
- @Mutation(() => ${serverGraphQLTypeName})
409
- async Create${entity.BaseTableCodeName}(
410
- @Arg('input', () => Create${entity.BaseTableCodeName}Input) input: Create${entity.BaseTableCodeName}Input,
411
- @Ctx() { dataSource, userPayload }: AppContext,
412
- @PubSub() pubSub: PubSubEngine
413
- ) {
414
- return this.CreateRecord('${entity.Name}', input, dataSource, userPayload, pubSub)
415
- }
416
- `;
417
- }
418
- if (entity.AllowUpdateAPI && !entity.VirtualEntity) {
419
- // generate an edit mutation
420
- const loadParamString = entity.PrimaryKeys.map((f) => `input.${f.CodeName}`).join(', ');
421
- sRet += `
422
- @Mutation(() => ${serverGraphQLTypeName})
423
- async Update${entity.BaseTableCodeName}(
424
- @Arg('input', () => Update${entity.BaseTableCodeName}Input) input: Update${entity.BaseTableCodeName}Input,
425
- @Ctx() { dataSource, userPayload }: AppContext,
426
- @PubSub() pubSub: PubSubEngine
427
- ) {
428
- return this.UpdateRecord('${entity.Name}', input, dataSource, userPayload, pubSub);
429
- }
430
- `;
431
- }
432
- if (entity.AllowDeleteAPI && !entity.VirtualEntity) {
433
- let graphQLPKEYArgs = '';
434
- let simplePKEYArgs = '';
435
- let compositeKeyString = '';
436
- let pkeys = '';
437
- let whereClause = '';
438
- for (let i = 0; i < entity.PrimaryKeys.length; i++) {
439
- const pk = entity.PrimaryKeys[i];
440
- const idQuotes = pk.NeedsQuotes ? "'" : '';
441
- graphQLPKEYArgs += graphQLPKEYArgs.length > 0 ? ', ' : '';
442
- graphQLPKEYArgs += `@Arg('${pk.CodeName}', () => ${pk.GraphQLType}) `;
443
- graphQLPKEYArgs += `${pk.CodeName}: ${pk.TSType}`;
444
- simplePKEYArgs += simplePKEYArgs.length > 0 ? ', ' : '';
445
- simplePKEYArgs += `${pk.CodeName}: ${pk.TSType}`;
446
- compositeKeyString += compositeKeyString.length > 0 ? ', ' : '';
447
- compositeKeyString += `{FieldName: '${pk.Name}', Value: ${pk.CodeName}}`;
448
- pkeys += pkeys.length > 0 ? ', ' : '';
449
- pkeys += `${pk.CodeName}`;
450
- whereClause += whereClause.length > 0 ? ' AND ' : '';
451
- whereClause += `[${pk.CodeName}]=${idQuotes}\${${pk.CodeName}}${idQuotes}`;
452
- }
453
- sRet += `
454
- @Mutation(() => ${serverGraphQLTypeName})
455
- async Delete${entity.BaseTableCodeName}(${graphQLPKEYArgs}, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
456
- const key = new CompositeKey([${compositeKeyString}]);
457
- return this.DeleteRecord('${entity.Name}', key, options, dataSource, userPayload, pubSub);
458
- }
459
- `;
460
- }
461
- return sRet;
462
- }
463
- generateOneToManyFieldResolver(entity, r, isInternal) {
464
- const md = new core_1.Metadata();
465
- const re = md.EntityByName(r.RelatedEntity);
466
- const instanceName = entity.BaseTableCodeName.toLowerCase() + this.GraphQLTypeSuffix;
467
- let filterFieldName = '';
468
- if (!r.EntityKeyField) {
469
- filterFieldName = entity.FirstPrimaryKey.CodeName;
470
- }
471
- else {
472
- const field = entity.Fields.find((f) => f.Name.trim().toLowerCase() === r.EntityKeyField.trim().toLowerCase());
473
- if (field) {
474
- filterFieldName = field.CodeName;
475
- }
476
- else {
477
- (0, logging_1.logError)(`GenerateOneToManyFieldResolver: EntityRelationshipInfo Field ${r.EntityKeyField} not found in entity ${entity.Name} - check the relationship ${r.ID} and the EntityKeyField property`);
478
- return '';
479
- }
480
- }
481
- const filterField = entity.Fields.find((f) => f.CodeName.toLowerCase() === filterFieldName.toLowerCase());
482
- if (!filterField) {
483
- (0, logging_1.logError)(`GenerateOneToManyFieldResolver: Field ${filterFieldName} not found in entity ${entity.Name} - check the relationship ${r.ID} and the EntityKeyField property`);
484
- return '';
485
- }
486
- const quotes = filterField.NeedsQuotes ? "'" : '';
487
- const serverPackagePrefix = re.SchemaName === config_1.mjCoreSchema && !isInternal ? 'mj_core_schema_server_object_types.' : '';
488
- const serverClassName = serverPackagePrefix + r.RelatedEntityBaseTableCodeName + this.GraphQLTypeSuffix;
489
- // create a code name that is the combination of the relatedentitycode name plus the relatedentityjoinfield that has spaces stripped
490
- // and replace all special characters with an underscore
491
- const uniqueCodeName = `${r.RelatedEntityCodeName}_${r.RelatedEntityJoinField.replace(/ /g, '')}`.replace(/[^a-zA-Z0-9]/g, '_');
492
- return `
493
- @FieldResolver(() => [${serverClassName}])
494
- async ${uniqueCodeName}Array(@Root() ${instanceName}: ${entity.BaseTableCodeName + this.GraphQLTypeSuffix}, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
495
- this.CheckUserReadPermissions('${r.RelatedEntity}', userPayload);
496
- const sSQL = \`SELECT * FROM [${this.schemaName(re)}].[${r.RelatedEntityBaseView}]\ WHERE [${r.RelatedEntityJoinField}]=${quotes}\${${instanceName}.${filterFieldName}}${quotes} \` + this.getRowLevelSecurityWhereClause('${r.RelatedEntity}', userPayload, EntityPermissionType.Read, 'AND');
497
- const result = this.ArrayMapFieldNamesToCodeNames('${r.RelatedEntity}', await dataSource.query(sSQL));
498
- return result;
499
- }
500
- `;
501
- }
502
- generateManyToManyFieldResolver(entity, r) {
503
- const md = new core_1.Metadata();
504
- const re = md.Entities.find((e) => e.Name.toLowerCase() == r.RelatedEntity.toLowerCase());
505
- const instanceName = entity.BaseTableCodeName.toLowerCase() + this.GraphQLTypeSuffix;
506
- let filterFieldName = '';
507
- if (!r.EntityKeyField) {
508
- filterFieldName = entity.FirstPrimaryKey.CodeName;
509
- }
510
- else {
511
- const field = entity.Fields.find((f) => f.Name.trim().toLowerCase() === r.EntityKeyField.trim().toLowerCase());
512
- if (field) {
513
- filterFieldName = field.CodeName;
514
- }
515
- else {
516
- (0, logging_1.logError)(`GenerateManyToManyFieldResolver: EntityRelationshipInfo Field ${r.EntityKeyField} not found in entity ${entity.Name} - check the relationship ${r.ID} and the EntityKeyField property`);
517
- return '';
518
- }
519
- }
520
- const filterField = entity.Fields.find((f) => f.CodeName.toLowerCase() === filterFieldName.toLowerCase());
521
- if (!filterField) {
522
- (0, logging_1.logError)(`GenerateManyToManyFieldResolver: Field ${filterFieldName} not found in entity ${entity.Name} - check the relationship ${r.ID} and the EntityKeyField property`);
523
- return '';
524
- }
525
- const quotes = filterField.NeedsQuotes ? "'" : '';
526
- const serverPackagePrefix = re.SchemaName === config_1.mjCoreSchema ? 'mj_core_schema_server_object_types.' : '';
527
- const serverClassName = serverPackagePrefix + r.RelatedEntityBaseTableCodeName + this.GraphQLTypeSuffix;
528
- // create a code name that is the combination of the relatedentitycode name plus the relatedentityjoinfield that has spaces stripped
529
- // and replace all special characters with an underscore
530
- const uniqueCodeName = `${r.RelatedEntityCodeName}_${r.JoinEntityJoinField.replace(/ /g, '')}`.replace(/[^a-zA-Z0-9]/g, '_');
531
- return `
532
- @FieldResolver(() => [${serverClassName}])
533
- async ${uniqueCodeName}Array(@Root() ${instanceName}: ${entity.BaseTableCodeName + this.GraphQLTypeSuffix}, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
534
- this.CheckUserReadPermissions('${r.RelatedEntity}', userPayload);
535
- const sSQL = \`SELECT * FROM [${this.schemaName(re)}].[${r.RelatedEntityBaseView}]\ WHERE [${re.FirstPrimaryKey.Name}] IN (SELECT [${r.JoinEntityInverseJoinField}] FROM [${this.schemaName(re)}].[${r.JoinView}] WHERE [${r.JoinEntityJoinField}]=${quotes}\${${instanceName}.${filterFieldName}}${quotes}) \` + this.getRowLevelSecurityWhereClause('${r.RelatedEntity}', userPayload, EntityPermissionType.Read, 'AND');
536
- const result = this.ArrayMapFieldNamesToCodeNames('${r.RelatedEntity}', await dataSource.query(sSQL));
537
- return result;
538
- }
539
- `;
540
- }
541
- };
542
- exports.GraphQLServerGeneratorBase = GraphQLServerGeneratorBase;
543
- exports.GraphQLServerGeneratorBase = GraphQLServerGeneratorBase = __decorate([
544
- (0, global_1.RegisterClass)(GraphQLServerGeneratorBase)
545
- ], GraphQLServerGeneratorBase);
546
- //# sourceMappingURL=graphql_server_codegen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql_server_codegen.js","sourceRoot":"","sources":["../src/graphql_server_codegen.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAgI;AAChI,4CAAoB;AACpB,gDAAwB;AACxB,4CAA0C;AAC1C,4CAA+C;AAC/C,sCAAsC;AACtC,mDAAuD;AAEvD;;;GAGG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAAhC;QAyBK,uBAAkB,GAAG,GAAG,CAAC;IAijBrC,CAAC;IAzkBQ,yBAAyB,CAC9B,QAAsB,EACtB,eAAuB,EACvB,8BAAsC,EACtC,sCAA+C;QAE/C,MAAM,UAAU,GAAG,8BAA8B,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;QACtG,IAAI,IAAI,GAAW,EAAE,CAAC;QACtB,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,mCAAmC,CAAC,QAAQ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