-
Notifications
You must be signed in to change notification settings - Fork 764
Query Limiting Depth #1472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can this |
@AstRonin I believe that would work. @firaskafri @sjdemartini @ulgens This use case has been requested a couple of time. If we go the route of porting over graphql-core graphql_impl to improve performance (see #1439 (comment) and #1393 (comment)), this would be quite easy to add |
@kiendang I like the idea of adding validation rules as an option to GraphQLView. I didn't realize that was already a feature of graphene (and just not graphene-django). Sounds like it's worthwhile given requests like this and the ability to support both graphene's built-in validation like depth-limits, as well as potentially other user-defined validators. |
@kiendang now that you've merged in the performance improvements and refactoring around graphene-django's query execution (thank you!), are you still planning on adding an option for validation rules in the |
Yup I just put up a PR in #1475. Implementation is simple but I haven't added any test though. |
Is your feature request related to a problem? Please describe.
Graphene has query validation about Depth limit Validator (https://docs.graphene-python.org/en/latest/execution/queryvalidation/#depth-limit-validator).
Would be great we will have it (depth) in django project.
Describe the solution you'd like
Limit depth of query. OWASP suggest add limit for security reason https://cheatsheetseries.owasp.org/cheatsheets/GraphQL_Cheat_Sheet.html#query-limiting-depth-amount
The text was updated successfully, but these errors were encountered: