@graphql-tools/wrap 8.4.0 → 8.4.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.
Files changed (3) hide show
  1. package/index.js +3 -1
  2. package/index.mjs +4 -2
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -863,7 +863,9 @@ class MapLeafValues {
863
863
  }
864
864
  transformFieldNode(field, variableDefinitionMap, variableValues) {
865
865
  const targetField = this._getTypeInfo().getFieldDef();
866
- utils.assertSome(targetField);
866
+ if (!targetField) {
867
+ return;
868
+ }
867
869
  const generateVariableName = utils.createVariableNameGenerator(variableDefinitionMap);
868
870
  if (!targetField.name.startsWith('__')) {
869
871
  const argumentNodes = field.arguments;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, isSpecifiedScalarType, isScalarType, visit, Kind, TypeInfo, visitWithTypeInfo, isObjectType, isInterfaceType, typeFromAST, isInputType, isLeafType, valueFromAST, getNullableType, BREAK, parse, getIntrospectionQuery, buildClientSchema } from 'graphql';
2
- import { getRootTypeMap, getResponseKeyFromInfo, mapSchema, MapperKind, renameType, visitData, transformInputValue, visitResult, assertSome, createVariableNameGenerator, updateArgument, relocatedError, getArgumentValues, valueMatchesCriteria, getDirectives, pruneSchema, selectObjectFields, appendObjectFields, modifyObjectFields, removeObjectFields, isAsyncIterable, AggregateError } from '@graphql-tools/utils';
2
+ import { getRootTypeMap, getResponseKeyFromInfo, mapSchema, MapperKind, renameType, visitData, transformInputValue, visitResult, createVariableNameGenerator, updateArgument, relocatedError, getArgumentValues, valueMatchesCriteria, getDirectives, pruneSchema, selectObjectFields, appendObjectFields, modifyObjectFields, removeObjectFields, isAsyncIterable, AggregateError } from '@graphql-tools/utils';
3
3
  import { applySchemaTransforms, delegateToSchema, isExternalObject, getUnpathedErrors, getSubschema, resolveExternalValue, defaultMergedResolver } from '@graphql-tools/delegate';
4
4
  import { ValueOrPromise } from 'value-or-promise';
5
5
 
@@ -859,7 +859,9 @@ class MapLeafValues {
859
859
  }
860
860
  transformFieldNode(field, variableDefinitionMap, variableValues) {
861
861
  const targetField = this._getTypeInfo().getFieldDef();
862
- assertSome(targetField);
862
+ if (!targetField) {
863
+ return;
864
+ }
863
865
  const generateVariableName = createVariableNameGenerator(variableDefinitionMap);
864
866
  if (!targetField.name.startsWith('__')) {
865
867
  const argumentNodes = field.arguments;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/wrap",
3
- "version": "8.4.0",
3
+ "version": "8.4.1",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {