graphql-python / graphql-python/sanic-graphql

How to handle response middleware?

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
148
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.