Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@envelop/extended-validation

Package Overview
Dependencies
Maintainers
1
Versions
1304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/extended-validation - npm Package Compare versions

Comparing version 1.2.0-alpha-d7e3951.0 to 1.2.0-alpha-d9602a7.0

8

index.js

@@ -6,3 +6,3 @@ 'use strict';

const graphql = require('graphql');
const values = require('graphql/execution/values');
const utils = require('@graphql-tools/utils');

@@ -75,7 +75,7 @@ const SYMBOL_EXTENDED_VALIDATION_RULES = Symbol('SYMBOL_EXTENDED_VALIDATION_RULES');

}
const values$1 = values.getArgumentValues(fieldType, node, executionArgs.variableValues);
const values = utils.getArgumentValues(fieldType, node, executionArgs.variableValues || undefined);
if (fieldType) {
const isOneOfFieldType = ((_b = fieldType.extensions) === null || _b === void 0 ? void 0 : _b.oneOf) || (fieldType.astNode && getDirectiveFromAstNode(fieldType.astNode, 'oneOf'));
if (isOneOfFieldType) {
if (Object.keys(values$1).length !== 1) {
if (Object.keys(values).length !== 1) {
validationContext.reportError(new graphql.GraphQLError(`Exactly one key must be specified for input for field "${fieldType.type.toString()}.${node.name.value}"`, [node]));

@@ -88,3 +88,3 @@ }

if (argType) {
traverseVariables(validationContext, arg, argType.type, values$1[arg.name.value]);
traverseVariables(validationContext, arg, argType.type, values[arg.name.value]);
}

@@ -91,0 +91,0 @@ }

{
"name": "@envelop/extended-validation",
"version": "1.2.0-alpha-d7e3951.0",
"version": "1.2.0-alpha-d9602a7.0",
"sideEffects": false,

@@ -8,2 +8,5 @@ "peerDependencies": {

},
"dependencies": {
"@graphql-tools/utils": "8.5.0"
},
"repository": {

@@ -10,0 +13,0 @@ "type": "git",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc