@graphql-tools/delegate 9.0.1 → 9.0.2-alpha-20220812030257-76a1a25e
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/cjs/Subschema.js +10 -1
- package/esm/Subschema.js +10 -1
- package/package.json +1 -1
- package/typings/Subschema.d.cts +3 -1
- package/typings/Subschema.d.ts +3 -1
package/cjs/Subschema.js
CHANGED
|
@@ -15,8 +15,17 @@ class Subschema {
|
|
|
15
15
|
this.batchingOptions = config.batchingOptions;
|
|
16
16
|
this.createProxyingResolver = config.createProxyingResolver;
|
|
17
17
|
this.transforms = (_a = config.transforms) !== null && _a !== void 0 ? _a : [];
|
|
18
|
-
this.transformedSchema = (0, applySchemaTransforms_js_1.applySchemaTransforms)(this.schema, config);
|
|
19
18
|
this.merge = config.merge;
|
|
20
19
|
}
|
|
20
|
+
get transformedSchema() {
|
|
21
|
+
if (!this._transformedSchema) {
|
|
22
|
+
console.warn('Transformed schema is not set yet. Returning a dummy one.');
|
|
23
|
+
this._transformedSchema = (0, applySchemaTransforms_js_1.applySchemaTransforms)(this.schema, this);
|
|
24
|
+
}
|
|
25
|
+
return this._transformedSchema;
|
|
26
|
+
}
|
|
27
|
+
set transformedSchema(value) {
|
|
28
|
+
this._transformedSchema = value;
|
|
29
|
+
}
|
|
21
30
|
}
|
|
22
31
|
exports.Subschema = Subschema;
|
package/esm/Subschema.js
CHANGED
|
@@ -11,7 +11,16 @@ export class Subschema {
|
|
|
11
11
|
this.batchingOptions = config.batchingOptions;
|
|
12
12
|
this.createProxyingResolver = config.createProxyingResolver;
|
|
13
13
|
this.transforms = (_a = config.transforms) !== null && _a !== void 0 ? _a : [];
|
|
14
|
-
this.transformedSchema = applySchemaTransforms(this.schema, config);
|
|
15
14
|
this.merge = config.merge;
|
|
16
15
|
}
|
|
16
|
+
get transformedSchema() {
|
|
17
|
+
if (!this._transformedSchema) {
|
|
18
|
+
console.warn('Transformed schema is not set yet. Returning a dummy one.');
|
|
19
|
+
this._transformedSchema = applySchemaTransforms(this.schema, this);
|
|
20
|
+
}
|
|
21
|
+
return this._transformedSchema;
|
|
22
|
+
}
|
|
23
|
+
set transformedSchema(value) {
|
|
24
|
+
this._transformedSchema = value;
|
|
25
|
+
}
|
|
17
26
|
}
|
package/package.json
CHANGED
package/typings/Subschema.d.cts
CHANGED
|
@@ -12,8 +12,10 @@ export declare class Subschema<K = any, V = any, C = K, TContext = Record<string
|
|
|
12
12
|
batchingOptions?: BatchingOptions<K, V, C>;
|
|
13
13
|
createProxyingResolver?: CreateProxyingResolverFn<TContext>;
|
|
14
14
|
transforms: Array<Transform<any, TContext>>;
|
|
15
|
-
|
|
15
|
+
private _transformedSchema;
|
|
16
16
|
merge?: Record<string, MergedTypeConfig<any, any, TContext>>;
|
|
17
17
|
constructor(config: SubschemaConfig<K, V, C, TContext>);
|
|
18
|
+
get transformedSchema(): GraphQLSchema;
|
|
19
|
+
set transformedSchema(value: GraphQLSchema);
|
|
18
20
|
}
|
|
19
21
|
export {};
|
package/typings/Subschema.d.ts
CHANGED
|
@@ -12,8 +12,10 @@ export declare class Subschema<K = any, V = any, C = K, TContext = Record<string
|
|
|
12
12
|
batchingOptions?: BatchingOptions<K, V, C>;
|
|
13
13
|
createProxyingResolver?: CreateProxyingResolverFn<TContext>;
|
|
14
14
|
transforms: Array<Transform<any, TContext>>;
|
|
15
|
-
|
|
15
|
+
private _transformedSchema;
|
|
16
16
|
merge?: Record<string, MergedTypeConfig<any, any, TContext>>;
|
|
17
17
|
constructor(config: SubschemaConfig<K, V, C, TContext>);
|
|
18
|
+
get transformedSchema(): GraphQLSchema;
|
|
19
|
+
set transformedSchema(value: GraphQLSchema);
|
|
18
20
|
}
|
|
19
21
|
export {};
|