Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

@envelop/extended-validation

Package Overview
Dependencies
Maintainers
1
Versions
1671
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.3.0
to
1.3.1
+5
-0
index.js

@@ -24,4 +24,9 @@ 'use strict';

onExecute({ args, setResultAndStopExecution }) {
// We hook into onExecute even though this is a validation pattern. The reasoning behind
// it is that hooking right after validation and before execution has started is the
// same as hooking into the validation step. The benefit of this approach is that
// we may use execution context in the validation rules.
const rules = args.contextValue[SYMBOL_EXTENDED_VALIDATION_RULES];
const errors = [];
// We replicate the default validation step manually before execution starts.
const typeInfo = schemaTypeInfo || new graphql.TypeInfo(args.schema);

@@ -28,0 +33,0 @@ const validationContext = new graphql.ValidationContext(args.schema, args.document, typeInfo, e => {

@@ -20,4 +20,9 @@ import { TypeInfo, ValidationContext, visitInParallel, visit, visitWithTypeInfo, isNonNullType, isListType, GraphQLError, GraphQLInputObjectType } from 'graphql';

onExecute({ args, setResultAndStopExecution }) {
// We hook into onExecute even though this is a validation pattern. The reasoning behind
// it is that hooking right after validation and before execution has started is the
// same as hooking into the validation step. The benefit of this approach is that
// we may use execution context in the validation rules.
const rules = args.contextValue[SYMBOL_EXTENDED_VALIDATION_RULES];
const errors = [];
// We replicate the default validation step manually before execution starts.
const typeInfo = schemaTypeInfo || new TypeInfo(args.schema);

@@ -24,0 +29,0 @@ const validationContext = new ValidationContext(args.schema, args.document, typeInfo, e => {

+3
-2
{
"name": "@envelop/extended-validation",
"version": "1.3.0",
"version": "1.3.1",
"sideEffects": false,

@@ -9,3 +9,4 @@ "peerDependencies": {

"dependencies": {
"@graphql-tools/utils": "8.5.2"
"@envelop/core": "^1.6.1",
"@graphql-tools/utils": "^8.5.3"
},

@@ -12,0 +13,0 @@ "repository": {

+1
-1

@@ -1,2 +0,2 @@

import { Plugin } from '@envelop/types';
import { Plugin } from '@envelop/core';
import { ExecutionArgs, ExecutionResult } from 'graphql';

@@ -3,0 +3,0 @@ import { ExtendedValidationRule } from './common';