Skip to content

Pass request_context to resolvers as a context value#19

Closed
ciscorn wants to merge 1 commit intographql-python:masterfrom
ciscorn:fix-request
Closed

Pass request_context to resolvers as a context value#19
ciscorn wants to merge 1 commit intographql-python:masterfrom
ciscorn:fix-request

Conversation

@ciscorn
Copy link
Copy Markdown
Contributor

@ciscorn ciscorn commented Aug 23, 2018

Request objects should be accessible via info.context, like sanic-graphql, aiohttp-graphql, etc.

Comment thread graphql_ws/base.py
@erik-megarad
Copy link
Copy Markdown

Is there any chance of this getting merged? This is blocking me, as there's no way to pass the request to a resolver.

@messa
Copy link
Copy Markdown

messa commented Mar 9, 2019

@subwindow

Is there any chance of this getting merged? This is blocking me, as there's no way to pass the request to a resolver.

@Cito is working on graphql-ws-next, hopefully will be published soon.

In the meantime you can "monkeypatch" this library - see #7 (comment) or the same thing in my demo project.

@erik-megarad
Copy link
Copy Markdown

Awesome, that worked. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants