📊 Prometheus exporter middleware for the Graphene GraphQL framework.
This is still under development. Use at your own risk.
Install using pip install graphene-prometheus
or poetry add graphene-prometheus
.
import graphene_prometheus
schema.execute("THE QUERY", middleware=[graphene_prometheus.PrometheusMiddleware()])
See https://docs.graphene-python.org/en/latest/execution/middleware/#middleware for more information.
In settings.py
:
GRAPHENE = {
"MIDDLEWARE": ["graphene_prometheus.PrometheusMiddleware"],
}
See https://docs.graphene-python.org/projects/django/en/latest/settings/#middleware for more information.
Coming soon.