File tree 3 files changed +18
-1
lines changed
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -269,3 +269,14 @@ Default: ``False``
269
269
270
270
271
271
.. _GraphiQLDocs : https://graphiql-test.netlify.app/typedoc/modules/graphiql_react#graphiqlprovider-2
272
+
273
+
274
+ ``MAX_VALIDATION_ERRORS ``
275
+ ------------------------------------
276
+
277
+ In case ``validation_rules `` are provided to ``GraphQLView ``, if this is set to a non-negative ``int `` value,
278
+ ``graphql.validation.validate `` will stop validation after this number of errors has been reached.
279
+ If not set or set to ``None ``, the maximum number of errors will follow ``graphql.validation.validate `` default
280
+ *i.e. * 100.
281
+
282
+ Default: ``None ``
Original file line number Diff line number Diff line change 43
43
"GRAPHIQL_INPUT_VALUE_DEPRECATION" : False ,
44
44
"ATOMIC_MUTATIONS" : False ,
45
45
"TESTING_ENDPOINT" : "/graphql" ,
46
+ "MAX_VALIDATION_ERRORS" : None ,
46
47
}
47
48
48
49
if settings .DEBUG :
Original file line number Diff line number Diff line change @@ -336,7 +336,12 @@ def execute_graphql_request(
336
336
)
337
337
)
338
338
339
- validation_errors = validate (schema , document , self .validation_rules )
339
+ validation_errors = validate (
340
+ schema ,
341
+ document ,
342
+ self .validation_rules ,
343
+ graphene_settings .MAX_VALIDATION_ERRORS ,
344
+ )
340
345
341
346
if validation_errors :
342
347
return ExecutionResult (data = None , errors = validation_errors )
You can’t perform that action at this time.
0 commit comments