Subscriptions "Complete Example" breaks under 0.10.0
See original GitHub issueI’m working with Subscriptions in ariadne using the exact code from the Complete Example in the docs. When I load the playground and issue the query subscription { counter }
, instead of a working counter, an “unsupported operand” error is raised:
Traceback (most recent call last):",
File \"/Users/...REDACTED.../virtualenvs/graphql-Pfr5HTvn/lib/python3.7/site-packages/graphql/execution/execute.py\", line 625, in resolve_field_value_or_error",
result = resolve_fn(source, info, **args)",
File \"/Users/...REDACTED.../app/__init__.py\", line 26, in counter_resolver",
return count + 1",
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'"
What’s wild is that the example in the docs works with ariadne 0.8.0 and 0.9.0, but not 0.10.0. I’m not familiar enough with the internals, though, to spot the issue in the 0.9.0…0.10.0 diff.
(For completeness, I’m using Python 3.7.6, ariadne 0.10.0, under uvicorn 0.11.2 and gunicorn 20.0.4.)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Azure PowerShell release notes - Microsoft Learn
Sets the default context for Azure PowerShell when logging in without specifying a subscription. 'DisplayBreakingChangeWarning': Controls if ...
Read more >Structured Streaming + Kafka Integration ... - Apache Spark
Sets the topic that all rows will be written to in Kafka. This option overrides any topic column that may exist in the...
Read more >What's New in Apache Kafka 3.0.0 - Confluent
Apache Kafka 3.0 introduces a variety of new features, breaking API changes, and improvements to KRaft—Apache Kafka's built-in consensus ...
Read more >How to insert a page break in HTML so wkhtmltopdf parses it?
Specify a CSS rule specific to the print media type. There are a number of properties that can be used for paging. I...
Read more >learnr 0.10.0 - RStudio
Rbuildignore for an example. Deploying dependencies not found. If your learnr tutorial contains broken code within exercises for users to fix, ...
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
my bad. I am using
uvicorn
, turns out I also need topip install websockets
for the server to support web socketsWe’ve just merged the fix for this. I’m expecting we’ll release Ariadne 0.11 with it in few days.