Example not working [similar to #177]
See original GitHub issueUsing Ariadne==0.5.0 and Uvicorn==0.8.3, following the example on https://ariadnegraphql.org/docs/django-integration, where it is in a list called http_routes
, and used in a ProtocalTypeRouter:
http_routes = []
http_routes.append(path("graphql/", GraphQL(schema, debug=True)))
router = ProtocolTypeRouter({
"http": URLRouter(http_routes),
"channel": ChannelNameRouter({
"channelone": ChannelOneConsumer
})
})
When Apollo-Federation calls this endpoint, I get:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 368, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.7/site-packages/uvicorn/middleware/asgi2.py", line 6, in __call__
instance = self.app(scope)
File "/usr/local/lib/python3.7/site-packages/channels/routing.py", line 58, in __call__
return self.application_mapping[scope["type"]](scope)
File "/usr/local/lib/python3.7/site-packages/channels/routing.py", line 144, in __call__
"kwargs": {**outer.get("kwargs", {}), **kwargs},
TypeError: __call__() missing 2 required positional arguments: 'receive' and 'send'
[2019-07-04 11:54:07 +0800] [497] [INFO] ('172.21.0.3', 50320) - "POST /graphql/ HTTP/1.0" 500
The comment https://github.com/mirumee/ariadne/issues/177#issuecomment-493950544 says that Ariadne should be using ASGI3, but uvicorn still shows to be using ASGI2? (uvicorn/middleware/asgi2.py
).
Btw I am using channels==2.2.0
What should I do to get around this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Synonyms of stated - Merriam-Webster Thesaurus
to convey in appropriate or telling terms please state the vehicle's mechanical problem as clearly and briefly as possible. Synonyms & Similar Words....
Read more >10.4 - Multicollinearity | STAT 462
Multicollinearity exists when two or more of the predictors in a regression model are moderately or highly correlated with one another.
Read more >Error bars in experimental biology - PMC - NCBI
Error bars commonly appear in figures in publications, but experimental biologists are often unsure how they should be used and interpreted.
Read more >More Is Different - TKM (KIT)
4 August 1972, Volume 177, Number 4047 less relevance they seem to have to the very real problems of the rest of sci-....
Read more >Table 2 Fallacy: Presenting and Interpreting Confounder and ...
An example. A recent article (11) illustrates the issues we raise above. Page 1,359 shows a Table 2 with the main exposure (work-related...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think you may be confusing two separate integrations, one for Django and one for Django Channels. You should only use one of them. Django Channels integration is currently broken as we’re waiting for an ASGI3 version of Channels.
Here’s a workaround ASGI2 compatibility class that you can use instead of
ariadne.asgi.GraphQL
if you want to use it:Closing this as answered. If there are any other questions, feel free to ask!