graphql-python / graphql-python/sanic-graphql

How to handle response middleware?

Aperta
#16 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
148
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

While doing normal REST request, the following code works without issue
however, when it comes to GraphQL, it seems like the middleware only handles 'request' but not 'response'

```
@app.middleware('response')
async def print_on_response(request, response):
print("I print when a response is returned by the server")
```

Anyone knows if this is a missing feature, bug, or am I the one who's missing something?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.