@envelop/extended-validation 1.1.1 → 1.2.0-alpha-ed2d5ef.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.
Files changed (3) hide show
  1. package/index.js +2 -2
  2. package/index.mjs +2 -2
  3. package/package.json +5 -2
package/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const graphql = require('graphql');
6
- const values_js = require('graphql/execution/values.js');
6
+ const utils = require('@graphql-tools/utils');
7
7
 
8
8
  const SYMBOL_EXTENDED_VALIDATION_RULES = Symbol('SYMBOL_EXTENDED_VALIDATION_RULES');
9
9
  const useExtendedValidation = (options) => {
@@ -71,7 +71,7 @@ const OneOfInputObjectsRule = (validationContext, executionArgs) => {
71
71
  if (!fieldType) {
72
72
  return;
73
73
  }
74
- const values = values_js.getArgumentValues(fieldType, node, executionArgs.variableValues);
74
+ const values = utils.getArgumentValues(fieldType, node, executionArgs.variableValues || undefined);
75
75
  if (fieldType) {
76
76
  const isOneOfFieldType = ((_b = fieldType.extensions) === null || _b === void 0 ? void 0 : _b.oneOf) || (fieldType.astNode && getDirectiveFromAstNode(fieldType.astNode, 'oneOf'));
77
77
  if (isOneOfFieldType) {
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TypeInfo, ValidationContext, visitInParallel, visit, visitWithTypeInfo, isNonNullType, isListType, GraphQLError, GraphQLInputObjectType } from 'graphql';
2
- import { getArgumentValues } from 'graphql/execution/values.js';
2
+ import { getArgumentValues } from '@graphql-tools/utils';
3
3
 
4
4
  const SYMBOL_EXTENDED_VALIDATION_RULES = Symbol('SYMBOL_EXTENDED_VALIDATION_RULES');
5
5
  const useExtendedValidation = (options) => {
@@ -67,7 +67,7 @@ const OneOfInputObjectsRule = (validationContext, executionArgs) => {
67
67
  if (!fieldType) {
68
68
  return;
69
69
  }
70
- const values = getArgumentValues(fieldType, node, executionArgs.variableValues);
70
+ const values = getArgumentValues(fieldType, node, executionArgs.variableValues || undefined);
71
71
  if (fieldType) {
72
72
  const isOneOfFieldType = ((_b = fieldType.extensions) === null || _b === void 0 ? void 0 : _b.oneOf) || (fieldType.astNode && getDirectiveFromAstNode(fieldType.astNode, 'oneOf'));
73
73
  if (isOneOfFieldType) {
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@envelop/extended-validation",
3
- "version": "1.1.1",
3
+ "version": "1.2.0-alpha-ed2d5ef.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "graphql": "^14.0.0 || ^15.0.0"
6
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
7
+ },
8
+ "dependencies": {
9
+ "@graphql-tools/utils": "8.5.0"
7
10
  },
8
11
  "repository": {
9
12
  "type": "git",