@kiwano/core 2.1.0 → 2.2.0-beta.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.
- package/dist/field.d.ts +4 -0
- package/dist/field.js +6 -0
- package/package.json +1 -1
package/dist/field.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface FieldBuilderInfo {
|
|
|
14
14
|
nonNull: boolean;
|
|
15
15
|
nonNullList: boolean;
|
|
16
16
|
list: boolean;
|
|
17
|
+
includeDeleted: boolean;
|
|
17
18
|
allowedRoles: Set<string>;
|
|
18
19
|
deniedRoles: Set<string>;
|
|
19
20
|
plugins: Plugin[];
|
|
@@ -28,6 +29,7 @@ export declare class FieldBuilder extends Builder<GraphQLFieldConfig<any, any>>
|
|
|
28
29
|
protected _nonNull: boolean;
|
|
29
30
|
protected _nonNullList: boolean;
|
|
30
31
|
protected _list: boolean;
|
|
32
|
+
protected _includeDeleted: boolean;
|
|
31
33
|
protected _allowedRoles: Set<string>;
|
|
32
34
|
protected _deniedRoles: Set<string>;
|
|
33
35
|
protected _resolver?: GraphQLFieldResolver<any, any>;
|
|
@@ -48,6 +50,8 @@ export declare class FieldBuilder extends Builder<GraphQLFieldConfig<any, any>>
|
|
|
48
50
|
resolver(resolver: GraphQLFieldResolver<any, any>): this;
|
|
49
51
|
allow(...roles: string[]): this;
|
|
50
52
|
deny(...roles: string[]): this;
|
|
53
|
+
includeDeleted(): this;
|
|
54
|
+
includeDeleted(includeDeleted: boolean): this;
|
|
51
55
|
finalizeBuilder(context: FinalizeContext): Promise<void>;
|
|
52
56
|
finalizeField(context: FinalizeContext, info: FieldBuilderInfo): Promise<void>;
|
|
53
57
|
build(context: BuildContext, parentBuilder?: ObjectTypeBuilder): GraphQLFieldConfig<any, any>;
|
package/dist/field.js
CHANGED
|
@@ -48,6 +48,7 @@ class FieldBuilder extends Builder_1.default {
|
|
|
48
48
|
this._nonNull = false;
|
|
49
49
|
this._nonNullList = false;
|
|
50
50
|
this._list = false;
|
|
51
|
+
this._includeDeleted = false;
|
|
51
52
|
this._allowedRoles = new Set();
|
|
52
53
|
this._deniedRoles = new Set();
|
|
53
54
|
this.type(type);
|
|
@@ -115,6 +116,10 @@ class FieldBuilder extends Builder_1.default {
|
|
|
115
116
|
roles.forEach(role => this._deniedRoles.add(role));
|
|
116
117
|
return this;
|
|
117
118
|
}
|
|
119
|
+
includeDeleted(includeDeleted = true) {
|
|
120
|
+
this._includeDeleted = includeDeleted;
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
118
123
|
async finalizeBuilder(context) {
|
|
119
124
|
const info = this.info();
|
|
120
125
|
await this._executePlugins('beforeFinalizeField', plugin => plugin.beforeFinalizeField(this, context, info));
|
|
@@ -173,6 +178,7 @@ class FieldBuilder extends Builder_1.default {
|
|
|
173
178
|
nonNull: this._nonNull,
|
|
174
179
|
nonNullList: this._nonNullList,
|
|
175
180
|
list: this._list,
|
|
181
|
+
includeDeleted: this._includeDeleted,
|
|
176
182
|
allowedRoles: new Set(this._allowedRoles),
|
|
177
183
|
deniedRoles: new Set(this._deniedRoles),
|
|
178
184
|
resolver: this._resolver,
|