Hello
I'm trying to use middlewares to do logging and to manage authorization. But I doen't find how to configure a middleware.
I've a
class Query(ObjectType):
... here some fields definition...
then
schema = Schema(query=Query)
vfonc = GraphQLView.as_view('graphql', schema=schema, graphiql=True)
flask_app.add_url_rule('/graphql', view_func=vfonc)
...
and I've 2 middlewares build after the model here:
https://docs.graphene-python.org/en/latest/execution/middleware/
But, that page describe how to add a middleware when you directly call schema.execute, which is an action that I never do.
I've read a lot (graphene doc, stack overflow...)
I think that I've seen answers in the Django context, but not applicable in my context (Flask).
Hello
I'm trying to use middlewares to do logging and to manage authorization. But I doen't find how to configure a middleware.
I've a
class Query(ObjectType):
... here some fields definition...
then
schema = Schema(query=Query)
vfonc = GraphQLView.as_view('graphql', schema=schema, graphiql=True)
flask_app.add_url_rule('/graphql', view_func=vfonc)
...
and I've 2 middlewares build after the model here:
https://docs.graphene-python.org/en/latest/execution/middleware/
But, that page describe how to add a middleware when you directly call schema.execute, which is an action that I never do.
I've read a lot (graphene doc, stack overflow...)
I think that I've seen answers in the Django context, but not applicable in my context (Flask).