@graphql-tools/wrap 8.1.1-alpha-5d885fa3.0 → 8.1.1
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/index.js +2 -1
- package/index.mjs +2 -1
- package/package.json +3 -3
- package/es5/README.md +0 -5
- package/es5/generateProxyingResolvers.d.ts +0 -4
- package/es5/index.d.ts +0 -5
- package/es5/index.js +0 -1915
- package/es5/index.mjs +0 -1877
- package/es5/introspect.d.ts +0 -4
- package/es5/package.json +0 -38
- package/es5/transforms/ExtractField.d.ts +0 -11
- package/es5/transforms/FilterInputObjectFields.d.ts +0 -10
- package/es5/transforms/FilterInterfaceFields.d.ts +0 -8
- package/es5/transforms/FilterObjectFieldDirectives.d.ts +0 -7
- package/es5/transforms/FilterObjectFields.d.ts +0 -8
- package/es5/transforms/FilterRootFields.d.ts +0 -8
- package/es5/transforms/FilterTypes.d.ts +0 -7
- package/es5/transforms/HoistField.d.ts +0 -22
- package/es5/transforms/MapFields.d.ts +0 -15
- package/es5/transforms/MapLeafValues.d.ts +0 -22
- package/es5/transforms/PruneSchema.d.ts +0 -8
- package/es5/transforms/RemoveObjectFieldDeprecations.d.ts +0 -8
- package/es5/transforms/RemoveObjectFieldDirectives.d.ts +0 -7
- package/es5/transforms/RemoveObjectFieldsWithDeprecation.d.ts +0 -7
- package/es5/transforms/RemoveObjectFieldsWithDirective.d.ts +0 -8
- package/es5/transforms/RenameInputObjectFields.d.ts +0 -13
- package/es5/transforms/RenameInterfaceFields.d.ts +0 -9
- package/es5/transforms/RenameObjectFields.d.ts +0 -9
- package/es5/transforms/RenameRootFields.d.ts +0 -9
- package/es5/transforms/RenameRootTypes.d.ts +0 -12
- package/es5/transforms/RenameTypes.d.ts +0 -14
- package/es5/transforms/TransformCompositeFields.d.ts +0 -21
- package/es5/transforms/TransformEnumValues.d.ts +0 -17
- package/es5/transforms/TransformInputObjectFields.d.ts +0 -16
- package/es5/transforms/TransformInterfaceFields.d.ts +0 -14
- package/es5/transforms/TransformObjectFields.d.ts +0 -14
- package/es5/transforms/TransformQuery.d.ts +0 -24
- package/es5/transforms/TransformRootFields.d.ts +0 -14
- package/es5/transforms/WrapFields.d.ts +0 -24
- package/es5/transforms/WrapQuery.d.ts +0 -12
- package/es5/transforms/WrapType.d.ts +0 -10
- package/es5/transforms/index.d.ts +0 -31
- package/es5/types.d.ts +0 -14
- package/es5/wrapSchema.d.ts +0 -3
package/index.js
CHANGED
|
@@ -825,8 +825,9 @@ class MapLeafValues {
|
|
|
825
825
|
return originalWrappingSchema;
|
|
826
826
|
}
|
|
827
827
|
transformRequest(originalRequest, _delegationContext, transformationContext) {
|
|
828
|
+
var _a;
|
|
828
829
|
const document = originalRequest.document;
|
|
829
|
-
const variableValues = (originalRequest.variables
|
|
830
|
+
const variableValues = (_a = originalRequest.variables) !== null && _a !== void 0 ? _a : {};
|
|
830
831
|
const operations = document.definitions.filter(def => def.kind === graphql.Kind.OPERATION_DEFINITION);
|
|
831
832
|
const fragments = document.definitions.filter(def => def.kind === graphql.Kind.FRAGMENT_DEFINITION);
|
|
832
833
|
const newOperations = this.transformOperations(operations, variableValues);
|
package/index.mjs
CHANGED
|
@@ -821,8 +821,9 @@ class MapLeafValues {
|
|
|
821
821
|
return originalWrappingSchema;
|
|
822
822
|
}
|
|
823
823
|
transformRequest(originalRequest, _delegationContext, transformationContext) {
|
|
824
|
+
var _a;
|
|
824
825
|
const document = originalRequest.document;
|
|
825
|
-
const variableValues = (originalRequest.variables
|
|
826
|
+
const variableValues = (_a = originalRequest.variables) !== null && _a !== void 0 ? _a : {};
|
|
826
827
|
const operations = document.definitions.filter(def => def.kind === Kind.OPERATION_DEFINITION);
|
|
827
828
|
const fragments = document.definitions.filter(def => def.kind === Kind.FRAGMENT_DEFINITION);
|
|
828
829
|
const newOperations = this.transformOperations(operations, variableValues);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/wrap",
|
|
3
|
-
"version": "8.1.1
|
|
3
|
+
"version": "8.1.1",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-tools/delegate": "8.2.
|
|
11
|
-
"@graphql-tools/schema": "8.2.
|
|
10
|
+
"@graphql-tools/delegate": "^8.2.0",
|
|
11
|
+
"@graphql-tools/schema": "^8.2.0",
|
|
12
12
|
"@graphql-tools/utils": "^8.2.0",
|
|
13
13
|
"tslib": "~2.3.0",
|
|
14
14
|
"value-or-promise": "1.0.10"
|
package/es5/README.md
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { GraphQLFieldResolver } from 'graphql';
|
|
2
|
-
import { SubschemaConfig, ICreateProxyingResolverOptions } from '@graphql-tools/delegate';
|
|
3
|
-
export declare function generateProxyingResolvers<TContext>(subschemaConfig: SubschemaConfig<any, any, any, TContext>): Record<string, Record<string, GraphQLFieldResolver<any, any>>>;
|
|
4
|
-
export declare function defaultCreateProxyingResolver<TContext>({ subschemaConfig, operation, transformedSchema, }: ICreateProxyingResolverOptions<TContext>): GraphQLFieldResolver<any, any>;
|
package/es5/index.d.ts
DELETED