@graphql-tools/wrap 10.0.23 → 10.0.24-alpha-8a518b5a83e07bd2eea5e9e3bd5dcd80c2f7b5eb

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @graphql-tools/wrap
2
2
 
3
+ ## 10.0.24-alpha-8a518b5a83e07bd2eea5e9e3bd5dcd80c2f7b5eb
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`6111e73`](https://github.com/graphql-hive/gateway/commit/6111e733371982027c1b572d8451889ac6f266ed)]:
8
+ - @graphql-tools/delegate@10.2.6-alpha-8a518b5a83e07bd2eea5e9e3bd5dcd80c2f7b5eb
9
+
3
10
  ## 10.0.23
4
11
 
5
12
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -330,7 +330,7 @@ class TransformCompositeFields {
330
330
  return transformedField;
331
331
  }
332
332
  });
333
- this.typeInfo = new graphql.TypeInfo(this.transformedSchema);
333
+ this.typeInfo = delegate.getTypeInfo(this.transformedSchema);
334
334
  this.subscriptionTypeName = originalWrappingSchema.getSubscriptionType()?.name;
335
335
  return this.transformedSchema;
336
336
  }
@@ -956,7 +956,7 @@ class TransformInputObjectFields {
956
956
  };
957
957
  }
958
958
  transformDocument(document, mapping, inputFieldNodeTransformer, inputObjectNodeTransformer, request, delegationContext) {
959
- const typeInfo = new graphql.TypeInfo(this._getTransformedSchema());
959
+ const typeInfo = delegate.getTypeInfo(this._getTransformedSchema());
960
960
  const newDocument = graphql.visit(
961
961
  document,
962
962
  graphql.visitWithTypeInfo(typeInfo, {
@@ -1124,6 +1124,13 @@ class FilterInputObjectFields {
1124
1124
  }
1125
1125
  }
1126
1126
 
1127
+ const getTypeInfo = utils.memoize1(function getTypeInfo2(schema) {
1128
+ return new graphql.TypeInfo(schema);
1129
+ });
1130
+ utils.memoize2(function getTypeInfoWithType2(schema, type) {
1131
+ return graphql.versionInfo.major < 16 ? new graphql.TypeInfo(schema, void 0, type) : new graphql.TypeInfo(schema, type);
1132
+ });
1133
+
1127
1134
  class MapLeafValues {
1128
1135
  inputValueTransformer;
1129
1136
  outputValueTransformer;
@@ -1146,7 +1153,7 @@ class MapLeafValues {
1146
1153
  }
1147
1154
  }
1148
1155
  }
1149
- this.typeInfo = new graphql.TypeInfo(originalWrappingSchema);
1156
+ this.typeInfo = getTypeInfo(originalWrappingSchema);
1150
1157
  return originalWrappingSchema;
1151
1158
  }
1152
1159
  transformRequest(originalRequest, delegationContext, transformationContext) {
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { delegateToSchema, isExternalObject, getUnpathedErrors, getSubschema, resolveExternalValue, applySchemaTransforms, defaultMergedResolver } from '@graphql-tools/delegate';
2
- import { getRootTypeMap, getResponseKeyFromInfo, memoize1, mapSchema, MapperKind, renameType, visitData, transformInputValue, getDefinedRootType, visitResult, astFromValueUntyped, getOperationASTFromRequest, relocatedError, getArgumentValues, valueMatchesCriteria, getDirectives, pruneSchema, selectObjectFields, appendObjectFields, modifyObjectFields, removeObjectFields, mapMaybePromise, isAsyncIterable, createGraphQLError, inspect } from '@graphql-tools/utils';
3
- import { GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, isSpecifiedScalarType, isScalarType, visit, Kind, TypeInfo, visitWithTypeInfo, isObjectType, isInterfaceType, typeFromAST, isInputType, getNamedType, isLeafType, valueFromAST, valueFromASTUntyped, astFromValue, GraphQLNonNull, getNullableType, isListType, GraphQLList, BREAK, parse, getIntrospectionQuery, buildClientSchema } from 'graphql';
1
+ import { delegateToSchema, isExternalObject, getUnpathedErrors, getSubschema, resolveExternalValue, applySchemaTransforms, defaultMergedResolver, getTypeInfo as getTypeInfo$1 } from '@graphql-tools/delegate';
2
+ import { getRootTypeMap, getResponseKeyFromInfo, memoize1, mapSchema, MapperKind, renameType, visitData, transformInputValue, getDefinedRootType, memoize2, visitResult, astFromValueUntyped, getOperationASTFromRequest, relocatedError, getArgumentValues, valueMatchesCriteria, getDirectives, pruneSchema, selectObjectFields, appendObjectFields, modifyObjectFields, removeObjectFields, mapMaybePromise, isAsyncIterable, createGraphQLError, inspect } from '@graphql-tools/utils';
3
+ import { GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, isSpecifiedScalarType, isScalarType, visit, Kind, visitWithTypeInfo, isObjectType, isInterfaceType, typeFromAST, isInputType, getNamedType, TypeInfo, versionInfo, isLeafType, valueFromAST, valueFromASTUntyped, astFromValue, GraphQLNonNull, getNullableType, isListType, GraphQLList, BREAK, parse, getIntrospectionQuery, buildClientSchema } from 'graphql';
4
4
 
5
5
  function generateProxyingResolvers(subschemaConfig) {
6
6
  const targetSchema = subschemaConfig.schema;
@@ -328,7 +328,7 @@ class TransformCompositeFields {
328
328
  return transformedField;
329
329
  }
330
330
  });
331
- this.typeInfo = new TypeInfo(this.transformedSchema);
331
+ this.typeInfo = getTypeInfo$1(this.transformedSchema);
332
332
  this.subscriptionTypeName = originalWrappingSchema.getSubscriptionType()?.name;
333
333
  return this.transformedSchema;
334
334
  }
@@ -954,7 +954,7 @@ class TransformInputObjectFields {
954
954
  };
955
955
  }
956
956
  transformDocument(document, mapping, inputFieldNodeTransformer, inputObjectNodeTransformer, request, delegationContext) {
957
- const typeInfo = new TypeInfo(this._getTransformedSchema());
957
+ const typeInfo = getTypeInfo$1(this._getTransformedSchema());
958
958
  const newDocument = visit(
959
959
  document,
960
960
  visitWithTypeInfo(typeInfo, {
@@ -1122,6 +1122,13 @@ class FilterInputObjectFields {
1122
1122
  }
1123
1123
  }
1124
1124
 
1125
+ const getTypeInfo = memoize1(function getTypeInfo2(schema) {
1126
+ return new TypeInfo(schema);
1127
+ });
1128
+ memoize2(function getTypeInfoWithType2(schema, type) {
1129
+ return versionInfo.major < 16 ? new TypeInfo(schema, void 0, type) : new TypeInfo(schema, type);
1130
+ });
1131
+
1125
1132
  class MapLeafValues {
1126
1133
  inputValueTransformer;
1127
1134
  outputValueTransformer;
@@ -1144,7 +1151,7 @@ class MapLeafValues {
1144
1151
  }
1145
1152
  }
1146
1153
  }
1147
- this.typeInfo = new TypeInfo(originalWrappingSchema);
1154
+ this.typeInfo = getTypeInfo(originalWrappingSchema);
1148
1155
  return originalWrappingSchema;
1149
1156
  }
1150
1157
  transformRequest(originalRequest, delegationContext, transformationContext) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/wrap",
3
- "version": "10.0.23",
3
+ "version": "10.0.24-alpha-8a518b5a83e07bd2eea5e9e3bd5dcd80c2f7b5eb",
4
4
  "type": "module",
5
5
  "description": "A set of utils for faster development of GraphQL tools",
6
6
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@graphql-tools/delegate": "^10.2.5",
41
+ "@graphql-tools/delegate": "10.2.6-alpha-8a518b5a83e07bd2eea5e9e3bd5dcd80c2f7b5eb",
42
42
  "@graphql-tools/schema": "^10.0.7",
43
43
  "@graphql-tools/utils": "^10.6.0",
44
44
  "tslib": "^2.4.0"