@kubun/graphql 0.4.4 → 0.4.5
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.
- package/lib/context.d.ts +4 -0
- package/lib/context.d.ts.map +1 -1
- package/lib/schema.d.ts +16 -2
- package/lib/schema.d.ts.map +1 -1
- package/lib/schema.js +227 -20
- package/package.json +6 -3
package/lib/context.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ export type MutationContext = {
|
|
|
41
41
|
executeSetMutation(modelID: string, unique: Uint8Array, data: DocumentData, info: GraphQLResolveInfo): Promise<DocumentNode>;
|
|
42
42
|
executeUpdateMutation(input: UpdateMutationInput, info: GraphQLResolveInfo): Promise<DocumentNode>;
|
|
43
43
|
executeRemoveMutation(id: string, info: GraphQLResolveInfo): Promise<void>;
|
|
44
|
+
executeSetModelAccessDefaults(modelId: string, permissionType: 'read' | 'write', accessLevel: string, allowedDIDs: Array<string> | null): Promise<void>;
|
|
45
|
+
executeRemoveModelAccessDefaults(modelId: string, permissionTypes: Array<'read' | 'write'>): Promise<void>;
|
|
46
|
+
executeSetDocumentAccessOverride(documentId: string, permissionType: 'read' | 'write', accessLevel: string, allowedDIDs: Array<string> | null): Promise<void>;
|
|
47
|
+
executeRemoveDocumentAccessOverride(documentId: string, permissionTypes: Array<'read' | 'write'>): Promise<void>;
|
|
44
48
|
};
|
|
45
49
|
export type Context = ReadOnlyContext & MutationContext;
|
|
46
50
|
//# sourceMappingURL=context.d.ts.map
|
package/lib/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,OAAO,EAAE,MAAM,WAAW,CAAA;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,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B,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChB,mCAAmC,CACjC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,GACvC,OAAO,CAAC,IAAI,CAAC,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,eAAe,GAAG,eAAe,CAAA"}
|
package/lib/schema.d.ts
CHANGED
|
@@ -25,22 +25,36 @@ type RelationField = {
|
|
|
25
25
|
};
|
|
26
26
|
type RelationFields = Record<string, Array<RelationField>>;
|
|
27
27
|
export type SchemaBuilderParams = {
|
|
28
|
-
aliases?: Record<string, string>;
|
|
29
28
|
record: DocumentModelsRecord;
|
|
29
|
+
aliases?: Record<string, string>;
|
|
30
|
+
onlyModels?: Array<string> | null;
|
|
31
|
+
includeInterfaceDependencies?: boolean;
|
|
32
|
+
includeRelationDependencies?: boolean;
|
|
33
|
+
includeMutations?: boolean;
|
|
34
|
+
includeSubscriptions?: boolean;
|
|
30
35
|
};
|
|
31
36
|
export declare class SchemaBuilder {
|
|
32
37
|
_aliases: Record<string, string>;
|
|
38
|
+
_aliasToModelID: Record<string, string>;
|
|
33
39
|
_definitions: SharedDefinitions | undefined;
|
|
34
40
|
_implemented: Record<string, Array<string>>;
|
|
41
|
+
_includedModelIDs: Set<string>;
|
|
42
|
+
_includeInterfaceDependencies: boolean;
|
|
43
|
+
_includeMutations: boolean;
|
|
44
|
+
_includeRelationDependencies: boolean;
|
|
45
|
+
_includeSubscriptions: boolean;
|
|
35
46
|
_inputObjects: Record<string, GraphQLInputObjectType>;
|
|
36
47
|
_mutations: GraphQLFieldConfigMap<unknown, Context>;
|
|
37
48
|
_nodeModelIDs: Array<string>;
|
|
49
|
+
_onlyModels: Array<string> | null;
|
|
38
50
|
_record: DocumentModelsRecord;
|
|
39
51
|
_references: ReferencesRecordModel;
|
|
40
52
|
_relationsTo: Record<string, RelationFields>;
|
|
41
53
|
_subscriptions: GraphQLFieldConfigMap<unknown, Context>;
|
|
42
54
|
_types: Record<string, GraphQLOutputType>;
|
|
43
55
|
constructor(params: SchemaBuilderParams);
|
|
56
|
+
_resolveModelIdentifier(identifier: string): string;
|
|
57
|
+
_resolveModelIDsToInclude(): Set<string>;
|
|
44
58
|
getModelIDs(id: string | null): Array<string>;
|
|
45
59
|
build(): GraphQLSchema;
|
|
46
60
|
_getDefinitions(): SharedDefinitions;
|
|
@@ -69,6 +83,6 @@ export declare class SchemaBuilder {
|
|
|
69
83
|
_buildEnumString(schema: StringEnumModel, parentName?: string): GraphQLEnumType;
|
|
70
84
|
_buildFormatString(schema: StringFormatModel): GraphQLScalarType<unknown, unknown>;
|
|
71
85
|
}
|
|
72
|
-
export declare function createSchema(
|
|
86
|
+
export declare function createSchema(params: SchemaBuilderParams): GraphQLSchema;
|
|
73
87
|
export {};
|
|
74
88
|
//# sourceMappingURL=schema.d.ts.map
|
package/lib/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,eAAe,EAAY,MAAM,WAAW,CAAA;AAC/E,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EAEZ,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,WAAW,EAEX,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,WAAW,EAEX,SAAS,EACV,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAGL,eAAe,EAEf,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAI1B,sBAAsB,EACtB,KAAK,gBAAgB,EAErB,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,aAAa,
|
|
1
|
+
{"version":3,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AAM,EACV,MAAM,EAAE,mBAAmB,GAAG,WAAW,EACzC,UAAU,SAAK,GACd,qBAAqB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAc1D,oBAAoB,CAClB,MAAM,EAAE,qBAAqB,CAAC,YAAY,EAAE,OAAO,CAAC,EACpD,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,aAAa,GACtB,IAAI;IA0BP,2BAA2B,CACzB,MAAM,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC/C,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,aAAa,GACtB,IAAI;IAsCP,YAAY,CACV,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,MAAM,GACjB,eAAe,GAAG,iBAAiB,GAAG,iBAAiB;IAa1D,kBAAkB,CAAC,MAAM,EAAE,iBAAiB;IAS5C,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,UAAU,SAAK,GAUvB,eAAe;IAGjD,kBAAkB,CAAC,MAAM,EAAE,iBAAiB;CAO7C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAEvE"}
|
package/lib/schema.js
CHANGED
|
@@ -222,14 +222,21 @@ const OrderByDirection = new GraphQLEnumType({
|
|
|
222
222
|
export class SchemaBuilder {
|
|
223
223
|
// Mapping of model or references IDs to their GraphQL object names
|
|
224
224
|
_aliases;
|
|
225
|
+
_aliasToModelID;
|
|
225
226
|
_definitions;
|
|
226
227
|
_implemented = {};
|
|
228
|
+
_includedModelIDs;
|
|
229
|
+
_includeInterfaceDependencies;
|
|
230
|
+
_includeMutations;
|
|
231
|
+
_includeRelationDependencies;
|
|
232
|
+
_includeSubscriptions;
|
|
227
233
|
_inputObjects = {
|
|
228
234
|
...VALUE_FILTER_INPUTS,
|
|
229
235
|
PatchOperation
|
|
230
236
|
};
|
|
231
237
|
_mutations = {};
|
|
232
238
|
_nodeModelIDs;
|
|
239
|
+
_onlyModels;
|
|
233
240
|
_record;
|
|
234
241
|
_references = {};
|
|
235
242
|
_relationsTo = {};
|
|
@@ -238,8 +245,21 @@ export class SchemaBuilder {
|
|
|
238
245
|
OrderByDirection
|
|
239
246
|
};
|
|
240
247
|
constructor(params){
|
|
241
|
-
this._aliases = params.aliases ?? {};
|
|
242
248
|
this._record = params.record;
|
|
249
|
+
this._onlyModels = params.onlyModels ?? null;
|
|
250
|
+
this._includeInterfaceDependencies = params.includeInterfaceDependencies ?? true;
|
|
251
|
+
this._includeRelationDependencies = params.includeRelationDependencies ?? true;
|
|
252
|
+
this._includeMutations = params.includeMutations ?? true;
|
|
253
|
+
this._includeSubscriptions = params.includeSubscriptions ?? true;
|
|
254
|
+
// params.aliases is { aliasName: modelID }, which is what we need for _aliasToModelID
|
|
255
|
+
this._aliasToModelID = params.aliases ?? {};
|
|
256
|
+
// Build reverse lookup map (modelID -> alias) for internal use
|
|
257
|
+
this._aliases = {};
|
|
258
|
+
for (const [alias, modelID] of Object.entries(this._aliasToModelID)){
|
|
259
|
+
this._aliases[modelID] = alias;
|
|
260
|
+
}
|
|
261
|
+
// Compute which models to include
|
|
262
|
+
this._includedModelIDs = this._resolveModelIDsToInclude();
|
|
243
263
|
const referencedInterfaces = {};
|
|
244
264
|
for (const [modelIDstring, model] of Object.entries(params.record)){
|
|
245
265
|
const modelID = DocumentModelID.fromString(modelIDstring);
|
|
@@ -279,6 +299,67 @@ export class SchemaBuilder {
|
|
|
279
299
|
}
|
|
280
300
|
this._nodeModelIDs = Array.from(nodeModelIDs);
|
|
281
301
|
}
|
|
302
|
+
_resolveModelIdentifier(identifier) {
|
|
303
|
+
// Check if it's a model ID (exists in record)
|
|
304
|
+
if (this._record[identifier] != null) {
|
|
305
|
+
return identifier;
|
|
306
|
+
}
|
|
307
|
+
// Check if it's an alias
|
|
308
|
+
const modelID = this._aliasToModelID[identifier];
|
|
309
|
+
if (modelID != null && this._record[modelID] != null) {
|
|
310
|
+
return modelID;
|
|
311
|
+
}
|
|
312
|
+
throw new Error(`Model identifier "${identifier}" not found. Must be a valid model ID or alias.`);
|
|
313
|
+
}
|
|
314
|
+
_resolveModelIDsToInclude() {
|
|
315
|
+
// If no restriction, include all models
|
|
316
|
+
if (this._onlyModels == null || this._onlyModels.length === 0) {
|
|
317
|
+
return new Set(Object.keys(this._record));
|
|
318
|
+
}
|
|
319
|
+
// Resolve identifiers to model IDs
|
|
320
|
+
const included = new Set();
|
|
321
|
+
for (const identifier of this._onlyModels){
|
|
322
|
+
const modelID = this._resolveModelIdentifier(identifier);
|
|
323
|
+
included.add(modelID);
|
|
324
|
+
}
|
|
325
|
+
// If both dependencies are disabled, return early
|
|
326
|
+
if (!this._includeInterfaceDependencies && !this._includeRelationDependencies) {
|
|
327
|
+
return included;
|
|
328
|
+
}
|
|
329
|
+
// Recursively collect dependencies
|
|
330
|
+
const toProcess = Array.from(included);
|
|
331
|
+
const processed = new Set();
|
|
332
|
+
while(toProcess.length > 0){
|
|
333
|
+
const modelID = toProcess.pop();
|
|
334
|
+
if (processed.has(modelID)) continue;
|
|
335
|
+
processed.add(modelID);
|
|
336
|
+
const model = this._record[modelID];
|
|
337
|
+
if (model == null) continue;
|
|
338
|
+
// Add interface dependencies if enabled
|
|
339
|
+
if (this._includeInterfaceDependencies) {
|
|
340
|
+
for (const iid of model.interfaces){
|
|
341
|
+
const interfaceID = getGlobalID(iid, modelID).toString();
|
|
342
|
+
if (!included.has(interfaceID)) {
|
|
343
|
+
included.add(interfaceID);
|
|
344
|
+
toProcess.push(interfaceID);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
// Add relation dependencies if enabled
|
|
349
|
+
if (this._includeRelationDependencies) {
|
|
350
|
+
for (const meta of Object.values(model.fieldsMeta)){
|
|
351
|
+
if (meta.type === 'document' && meta.model != null && meta.model !== null) {
|
|
352
|
+
const relationID = getGlobalID(meta.model, modelID).toString();
|
|
353
|
+
if (!included.has(relationID)) {
|
|
354
|
+
included.add(relationID);
|
|
355
|
+
toProcess.push(relationID);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return included;
|
|
362
|
+
}
|
|
282
363
|
getModelIDs(id) {
|
|
283
364
|
return id === null ? this._nodeModelIDs : this._implemented[id] ?? [
|
|
284
365
|
id
|
|
@@ -291,7 +372,7 @@ export class SchemaBuilder {
|
|
|
291
372
|
nodes: definitions.nodesField,
|
|
292
373
|
...definitions.queryFields
|
|
293
374
|
};
|
|
294
|
-
for (const id of
|
|
375
|
+
for (const id of this._includedModelIDs){
|
|
295
376
|
this._buildDocument(id);
|
|
296
377
|
const name = this._aliases[id];
|
|
297
378
|
const filterArg = {
|
|
@@ -311,16 +392,95 @@ export class SchemaBuilder {
|
|
|
311
392
|
}
|
|
312
393
|
};
|
|
313
394
|
}
|
|
314
|
-
|
|
395
|
+
// Add access control mutations if mutations are enabled
|
|
396
|
+
if (this._includeMutations) {
|
|
397
|
+
this._mutations.setModelAccessDefaults = {
|
|
398
|
+
type: GraphQLBoolean,
|
|
399
|
+
args: {
|
|
400
|
+
modelId: {
|
|
401
|
+
type: new GraphQLNonNull(GraphQLID)
|
|
402
|
+
},
|
|
403
|
+
permissionType: {
|
|
404
|
+
type: new GraphQLNonNull(GraphQLString)
|
|
405
|
+
},
|
|
406
|
+
accessLevel: {
|
|
407
|
+
type: new GraphQLNonNull(GraphQLString)
|
|
408
|
+
},
|
|
409
|
+
allowedDIDs: {
|
|
410
|
+
type: toList(GraphQLString)
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
resolve: async (_, args, ctx)=>{
|
|
414
|
+
await ctx.executeSetModelAccessDefaults(args.modelId, args.permissionType, args.accessLevel, args.allowedDIDs ?? null);
|
|
415
|
+
return true;
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
this._mutations.removeModelAccessDefaults = {
|
|
419
|
+
type: GraphQLBoolean,
|
|
420
|
+
args: {
|
|
421
|
+
modelId: {
|
|
422
|
+
type: new GraphQLNonNull(GraphQLID)
|
|
423
|
+
},
|
|
424
|
+
permissionTypes: {
|
|
425
|
+
type: new GraphQLNonNull(toList(GraphQLString))
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
resolve: async (_, args, ctx)=>{
|
|
429
|
+
await ctx.executeRemoveModelAccessDefaults(args.modelId, args.permissionTypes);
|
|
430
|
+
return true;
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
this._mutations.setDocumentAccessOverride = {
|
|
434
|
+
type: GraphQLBoolean,
|
|
435
|
+
args: {
|
|
436
|
+
documentId: {
|
|
437
|
+
type: new GraphQLNonNull(GraphQLID)
|
|
438
|
+
},
|
|
439
|
+
permissionType: {
|
|
440
|
+
type: new GraphQLNonNull(GraphQLString)
|
|
441
|
+
},
|
|
442
|
+
accessLevel: {
|
|
443
|
+
type: new GraphQLNonNull(GraphQLString)
|
|
444
|
+
},
|
|
445
|
+
allowedDIDs: {
|
|
446
|
+
type: toList(GraphQLString)
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
resolve: async (_, args, ctx)=>{
|
|
450
|
+
await ctx.executeSetDocumentAccessOverride(args.documentId, args.permissionType, args.accessLevel, args.allowedDIDs ?? null);
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
this._mutations.removeDocumentAccessOverride = {
|
|
455
|
+
type: GraphQLBoolean,
|
|
456
|
+
args: {
|
|
457
|
+
documentId: {
|
|
458
|
+
type: new GraphQLNonNull(GraphQLID)
|
|
459
|
+
},
|
|
460
|
+
permissionTypes: {
|
|
461
|
+
type: new GraphQLNonNull(toList(GraphQLString))
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
resolve: async (_, args, ctx)=>{
|
|
465
|
+
await ctx.executeRemoveDocumentAccessOverride(args.documentId, args.permissionTypes);
|
|
466
|
+
return true;
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
const config = {
|
|
315
471
|
query: new GraphQLObjectType({
|
|
316
472
|
name: 'Query',
|
|
317
473
|
fields: queryFields
|
|
318
|
-
})
|
|
319
|
-
|
|
474
|
+
})
|
|
475
|
+
};
|
|
476
|
+
if (this._includeMutations) {
|
|
477
|
+
config.mutation = new GraphQLObjectType({
|
|
320
478
|
name: 'Mutation',
|
|
321
479
|
fields: this._mutations
|
|
322
|
-
})
|
|
323
|
-
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
if (this._includeSubscriptions) {
|
|
483
|
+
config.subscription = new GraphQLObjectType({
|
|
324
484
|
name: 'Subscription',
|
|
325
485
|
fields: ()=>{
|
|
326
486
|
const fields = {
|
|
@@ -345,6 +505,7 @@ export class SchemaBuilder {
|
|
|
345
505
|
}
|
|
346
506
|
};
|
|
347
507
|
for (const [id, model] of Object.entries(this._record)){
|
|
508
|
+
if (!this._includedModelIDs.has(id)) continue;
|
|
348
509
|
const name = this._aliases[id];
|
|
349
510
|
fields[`new${name}Created`] = {
|
|
350
511
|
type: new GraphQLNonNull(this._types[id]),
|
|
@@ -363,14 +524,16 @@ export class SchemaBuilder {
|
|
|
363
524
|
}
|
|
364
525
|
for (const [fieldName, relations] of Object.entries(this._relationsTo[id] ?? {})){
|
|
365
526
|
for (const relation of relations){
|
|
527
|
+
if (!this._includedModelIDs.has(relation.model)) continue;
|
|
366
528
|
this._buildRelationSubscriptions(fields, id, fieldName, relation);
|
|
367
529
|
}
|
|
368
530
|
}
|
|
369
531
|
}
|
|
370
532
|
return fields;
|
|
371
533
|
}
|
|
372
|
-
})
|
|
373
|
-
}
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
return new GraphQLSchema(config);
|
|
374
537
|
}
|
|
375
538
|
_getDefinitions() {
|
|
376
539
|
if (this._definitions == null) {
|
|
@@ -462,6 +625,7 @@ export class SchemaBuilder {
|
|
|
462
625
|
}
|
|
463
626
|
};
|
|
464
627
|
for (const [id, model] of Object.entries(this._record)){
|
|
628
|
+
if (!this._includedModelIDs.has(id)) continue;
|
|
465
629
|
switch(model.behavior){
|
|
466
630
|
case 'interface':
|
|
467
631
|
continue;
|
|
@@ -528,6 +692,30 @@ export class SchemaBuilder {
|
|
|
528
692
|
}
|
|
529
693
|
}
|
|
530
694
|
});
|
|
695
|
+
// Create AccessRule type for read/write permissions
|
|
696
|
+
const accessRuleObject = new GraphQLObjectType({
|
|
697
|
+
name: 'AccessRule',
|
|
698
|
+
fields: {
|
|
699
|
+
level: {
|
|
700
|
+
type: new GraphQLNonNull(GraphQLString)
|
|
701
|
+
},
|
|
702
|
+
allowedDIDs: {
|
|
703
|
+
type: new GraphQLList(new GraphQLNonNull(GraphQLString))
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
// Create AccessPermissions type
|
|
708
|
+
const accessPermissionsObject = new GraphQLObjectType({
|
|
709
|
+
name: 'AccessPermissions',
|
|
710
|
+
fields: {
|
|
711
|
+
read: {
|
|
712
|
+
type: accessRuleObject
|
|
713
|
+
},
|
|
714
|
+
write: {
|
|
715
|
+
type: accessRuleObject
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
});
|
|
531
719
|
const documentNodeFields = {
|
|
532
720
|
// Node interface
|
|
533
721
|
id: {
|
|
@@ -545,6 +733,11 @@ export class SchemaBuilder {
|
|
|
545
733
|
},
|
|
546
734
|
updatedAt: {
|
|
547
735
|
type: GraphQLDateTimeISO
|
|
736
|
+
},
|
|
737
|
+
// Access control
|
|
738
|
+
accessPermissions: {
|
|
739
|
+
type: accessPermissionsObject,
|
|
740
|
+
resolve: (doc)=>doc.data?.accessPermissions ?? null
|
|
548
741
|
}
|
|
549
742
|
};
|
|
550
743
|
const documentInterface = new GraphQLInterfaceType({
|
|
@@ -590,7 +783,7 @@ export class SchemaBuilder {
|
|
|
590
783
|
definitions.nodeInterface
|
|
591
784
|
].concat(model.interfaces.map((interfaceID)=>{
|
|
592
785
|
return this._types[getGlobalID(interfaceID, id).toString()];
|
|
593
|
-
}));
|
|
786
|
+
}).filter((type)=>type != null));
|
|
594
787
|
},
|
|
595
788
|
fields: ()=>this._buildDocumentFields(id, model, name)
|
|
596
789
|
};
|
|
@@ -610,7 +803,7 @@ export class SchemaBuilder {
|
|
|
610
803
|
this._buildObjectFilterInput(id, model.schema, name, true);
|
|
611
804
|
this._buildObjectOrderByInput(id, model.schema, name, true);
|
|
612
805
|
// TODO: move to dedicated method
|
|
613
|
-
if (!isInterface) {
|
|
806
|
+
if (!isInterface && this._includeMutations) {
|
|
614
807
|
if (model.behavior === 'default') {
|
|
615
808
|
this._mutations[`create${name}`] = mutationWithClientMutationId({
|
|
616
809
|
name: `Create${name}`,
|
|
@@ -688,10 +881,18 @@ export class SchemaBuilder {
|
|
|
688
881
|
type: new GraphQLNonNull(GraphQLID)
|
|
689
882
|
}
|
|
690
883
|
}),
|
|
691
|
-
outputFields: ()=>
|
|
884
|
+
outputFields: ()=>({
|
|
885
|
+
...definitions.queryFields,
|
|
886
|
+
// Return id so it can be used with Relay's @deleteEdge directive
|
|
887
|
+
id: {
|
|
888
|
+
type: new GraphQLNonNull(GraphQLID)
|
|
889
|
+
}
|
|
890
|
+
}),
|
|
692
891
|
mutateAndGetPayload: async (input, ctx, info)=>{
|
|
693
892
|
await ctx.executeRemoveMutation(input.id, info);
|
|
694
|
-
return {
|
|
893
|
+
return {
|
|
894
|
+
id: input.id
|
|
895
|
+
};
|
|
695
896
|
}
|
|
696
897
|
});
|
|
697
898
|
}
|
|
@@ -761,7 +962,14 @@ export class SchemaBuilder {
|
|
|
761
962
|
relationType = definitions.documentInterface;
|
|
762
963
|
} else {
|
|
763
964
|
relationModelID = getGlobalID(relationModel, id).toString();
|
|
764
|
-
|
|
965
|
+
// Check if the related model is included in the schema
|
|
966
|
+
if (this._includedModelIDs.has(relationModelID)) {
|
|
967
|
+
relationType = this._buildDocument(relationModelID);
|
|
968
|
+
} else {
|
|
969
|
+
// Fall back to generic DocumentNode interface
|
|
970
|
+
relationType = definitions.documentInterface;
|
|
971
|
+
relationModelID = null; // Treat as unspecified model
|
|
972
|
+
}
|
|
765
973
|
}
|
|
766
974
|
if (isList(field.type)) {
|
|
767
975
|
// TODO: add suport for filters?
|
|
@@ -789,12 +997,14 @@ export class SchemaBuilder {
|
|
|
789
997
|
const interfaceID = getGlobalID(iid, id).toString();
|
|
790
998
|
for (const [fieldName, relations] of Object.entries(this._relationsTo[interfaceID] ?? {})){
|
|
791
999
|
for (const relation of relations){
|
|
1000
|
+
if (!this._includedModelIDs.has(relation.model)) continue;
|
|
792
1001
|
this._buildRelationFields(fields, fieldName, relation);
|
|
793
1002
|
}
|
|
794
1003
|
}
|
|
795
1004
|
}
|
|
796
1005
|
for (const [fieldName, relations] of Object.entries(this._relationsTo[id] ?? {})){
|
|
797
1006
|
for (const relation of relations){
|
|
1007
|
+
if (!this._includedModelIDs.has(relation.model)) continue;
|
|
798
1008
|
this._buildRelationFields(fields, fieldName, relation);
|
|
799
1009
|
}
|
|
800
1010
|
}
|
|
@@ -823,7 +1033,7 @@ export class SchemaBuilder {
|
|
|
823
1033
|
return model.interfaces.map((interfaceID)=>{
|
|
824
1034
|
const typeID = `${getGlobalID(interfaceID, id).toString()}-data`;
|
|
825
1035
|
return this._types[typeID];
|
|
826
|
-
});
|
|
1036
|
+
}).filter((type)=>type != null);
|
|
827
1037
|
},
|
|
828
1038
|
fields
|
|
829
1039
|
};
|
|
@@ -1194,9 +1404,6 @@ export class SchemaBuilder {
|
|
|
1194
1404
|
return scalar;
|
|
1195
1405
|
}
|
|
1196
1406
|
}
|
|
1197
|
-
export function createSchema(
|
|
1198
|
-
return new SchemaBuilder(
|
|
1199
|
-
record,
|
|
1200
|
-
aliases
|
|
1201
|
-
}).build();
|
|
1407
|
+
export function createSchema(params) {
|
|
1408
|
+
return new SchemaBuilder(params).build();
|
|
1202
1409
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubun/graphql",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"license": "see LICENSE.md",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"type": "module",
|
|
@@ -23,10 +23,13 @@
|
|
|
23
23
|
"graphql-scalars": "^1.25.0",
|
|
24
24
|
"multiformats": "^13.4.2",
|
|
25
25
|
"@kubun/id": "^0.4.0",
|
|
26
|
-
"@kubun/protocol": "^0.4.
|
|
26
|
+
"@kubun/protocol": "^0.4.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@
|
|
29
|
+
"@enkaku/capability": "^0.12.1",
|
|
30
|
+
"@enkaku/token": "0.12.3",
|
|
31
|
+
"@kubun/db": "^0.4.0",
|
|
32
|
+
"@kubun/test-utils": "^0.4.0"
|
|
30
33
|
},
|
|
31
34
|
"scripts": {
|
|
32
35
|
"build:clean": "del lib",
|