I am using django graphql and have lots of queries. I have some public queries on which anyone does deep queries.
I want to limit the depth of each query. Found this on the documentation https://docs.graphene-python.org/en/latest/execution/queryvalidation/ but didn't find any proper way to use it.
Also, Is there any way to pass dynamic fields to graphene fields like this:
jobs = graphene.List(JobGQLType, fields=['title', 'location'])
Any help would be really appreciated.

According to this Github issue it looks like there is no way to modify the default validation rules that the graphql-python runs on all queries. Instead, you have to add your own call to the
validatemethod somewhere in the code that runs when a query is executed.Here is an example of adding a depth limiting validation check to the Graphene schema
executemethod. Maybe there's a more efficient way, but at least I can confirm that this works.