forked from graphql-python/graphql-core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support extending the GraphQLCoreBackend class with custom validators by adding a function \"get_validation_rules\" that can be overridden in subclasses where needed. This change in combination with setting the default graphql backend allows for easy additions to validation rules. An example use case would be if there's a need to perform query cost or depth analysis, one can create a validator that restricts execution of the query based on it's execution cost. Of course this could also be used to remove validators if that is necessary for some use case. Resolves graphql-python#267
- Loading branch information
Showing
2 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters