Skip to content
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

Add support for custom validators #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 25, 2020

  1. Add support for custom validators

    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
    JoaRiski committed Feb 25, 2020
    Configuration menu
    Copy the full SHA
    edce556 View commit details
    Browse the repository at this point in the history