@envelop/extended-validation
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -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 => { |
{ | ||
"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,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'; |
Sorry, the diff of this file is not supported yet
17695
276
3
+ Added@envelop/core@^1.6.1
+ Added@envelop/core@1.7.1(transitive)
+ Added@envelop/types@1.5.1(transitive)
+ Added@graphql-tools/utils@8.13.1(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@graphql-tools/utils@8.5.2(transitive)
- Removedtslib@2.3.1(transitive)
Updated@graphql-tools/utils@^8.5.3