Description
validation rules are the recommended way to implement things like depth limit validators and other sorts of protectors.
When inspecting the source code, I found out that validation_rules
aren't passed as an argument during schema execution. It would be nice if this could be fixed so that we could implement our own validation rules.
graphql-server/graphql_server/flask/graphqlview.py
Lines 87 to 98 in c03e1a4
over here, the http query is run via the run_http_query
function.
This method also takes other execution options, as shown below.
graphql-server/graphql_server/__init__.py
Lines 58 to 67 in c03e1a4
Inside the run_http_query
method, this function is called.
graphql-server/graphql_server/__init__.py
Lines 122 to 124 in c03e1a4
this function, get_response
takes another execution option, validation_rules
.
This is not being passed anywhere, and always remains None.
graphql-server/graphql_server/__init__.py
Lines 234 to 243 in c03e1a4
I will send a PR ASAP!