graphene icon indicating copy to clipboard operation
graphene copied to clipboard

More documentation for DisableIntrospection?

Open dwjp opened this issue 1 year ago • 0 comments

The docs currently give this example:

validation_errors = validate(
    schema=schema.graphql_schema,
    document_ast=parse('THE QUERY'),
    rules=(
        DisableIntrospection,
    )
)

But it's not obvious how to set document_ast, and leave it as an exercise to the reader assuming knowledge on Query AST. How should this be setup to disable introspection across all queries?

(Appreciate you might prefer support requests elsewhere, but no hits on my SO post on this https://stackoverflow.com/questions/78100152/how-to-disable-introspection-on-graphene-python/78498422#78498422 and see it was also raised in https://github.com/graphql-python/graphene/issues/1388#issuecomment-1282388489)

dwjp avatar May 21 '24 04:05 dwjp