| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
After reading a bit regarding what context is used for, I submitted another commit with a possible test suite to ensure and help others to understand the proper functionality of context using Flask as example. |
Sorry, something went wrong.
There was a problem hiding this comment.
Some left over print statements need to be removed but otherwise looks good.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This add support for graphiql options like as:
Also, add the missing context attribute as requested at this old flask-graphql#52 issue.
However, the approach I used for all 4 servers (flask, aiohttp, webob, sanic) was based on this sanic#8 issue which was solved at this pull request.
There are other related issues as well on each server integrations:
As far as I know, this context will be passed to the execute method on GraphQL, which will be passed to all resolve functions as stated on GraphQL-JS docs. At the end, this will be part of the GraphQLResolveInfo, which is used by resolve_field_value_or_error to resolve the field.
Based on that, I am not 100% sure if it the correct way of handling custom context for all server integrations so any suggestion is welcome!