@graphql-tools/wrap 8.4.4 → 8.4.7-alpha-bd5ea4d7.0

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 CHANGED
@@ -1028,7 +1028,7 @@ class TransformQuery {
1028
1028
  const document = graphql.visit(originalRequest.document, {
1029
1029
  [graphql.Kind.FIELD]: {
1030
1030
  enter: node => {
1031
- if (index === pathLength || node.name.value !== this.path[index] || node.selectionSet == null) {
1031
+ if (index === pathLength || node.name.value !== this.path[index]) {
1032
1032
  return false;
1033
1033
  }
1034
1034
  index++;
package/index.mjs CHANGED
@@ -1024,7 +1024,7 @@ class TransformQuery {
1024
1024
  const document = visit(originalRequest.document, {
1025
1025
  [Kind.FIELD]: {
1026
1026
  enter: node => {
1027
- if (index === pathLength || node.name.value !== this.path[index] || node.selectionSet == null) {
1027
+ if (index === pathLength || node.name.value !== this.path[index]) {
1028
1028
  return false;
1029
1029
  }
1030
1030
  index++;
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@graphql-tools/wrap",
3
- "version": "8.4.4",
3
+ "version": "8.4.7-alpha-bd5ea4d7.0",
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.5.1",
11
- "@graphql-tools/schema": "^8.3.2",
12
- "@graphql-tools/utils": "^8.6.2",
10
+ "@graphql-tools/delegate": "8.6.0-alpha-bd5ea4d7.0",
11
+ "@graphql-tools/schema": "8.3.3",
12
+ "@graphql-tools/utils": "8.6.3",
13
13
  "tslib": "~2.3.0",
14
14
  "value-or-promise": "1.0.11"
15
15
  },
@@ -1,7 +1,7 @@
1
1
  import { SelectionSetNode, FragmentDefinitionNode } from 'graphql';
2
2
  import { ExecutionRequest, ExecutionResult } from '@graphql-tools/utils';
3
3
  import { Transform, DelegationContext } from '@graphql-tools/delegate';
4
- export declare type QueryTransformer = <TContext>(selectionSet: SelectionSetNode, fragments: Record<string, FragmentDefinitionNode>, delegationContext: DelegationContext<TContext>, transformationContext: Record<string, any>) => SelectionSetNode;
4
+ export declare type QueryTransformer = <TContext>(selectionSet: SelectionSetNode | undefined, fragments: Record<string, FragmentDefinitionNode>, delegationContext: DelegationContext<TContext>, transformationContext: Record<string, any>) => SelectionSetNode;
5
5
  export declare type ResultTransformer = <TContext>(result: any, delegationContext: DelegationContext<TContext>, transformationContext: Record<string, any>) => any;
6
6
  export declare type ErrorPathTransformer = (path: ReadonlyArray<string | number>) => Array<string | number>;
7
7
  interface TransformQueryTransformationContext extends Record<string, any> {