- Ability to configure server notification queue limit per subscribtion.
- Switched to Channels 3.
- Python dependencies updated.
- Django channel name added to the context as the
channel_name
record. - Python dependencies updated.
- Client method 'execute' consumes 'complete' message in case of error.
- Logging slightly improved. Thanks to @edouardtheron.
- Quadratic growth of threads number has stopped. The problem was
observer on Python 3.6 and 3.7 and was not on 3.8, because starting
with 3.8
ThreadPoolExecutor
does not spawn new thread if there are idle threads in the pool already. The issue was in the fact that for each of worker thread we run an event loop which default executor is theThreadPoolExecutor
with default (by Python) number of threads. All this eventually ended up in hundreds of thread created for eachGraphqlWsConsumer
subclass.
- Python 3.6 compatibility brought back.
- Subscription
payload
now properly serializes the following Pythondatetime
types:datetime.datetime
datetime.date
datetime.time
- Allow
msgpack v1.*
in the dependencies requirements. - Windows support improved: tests fixed, example fixed.
- Development instructions updated in the
README.md
. - Removed
graphql-core
version lock, it is hold bygraphene
anyway. - Many CI-related fixes.
- Added support for Python 3.6.
- Dependencies updated and relaxed, now Django 3 is allowed.
- Testing framework improved to run on 3.6, 3.7, 3.8 with Tox.
- Client setup documentation (Python, GraphiQL) improved. Thanks to Rigel Kent.
- Error logging added to simplify debugging, error messages improved.
- Fixed wrong year in this changelog (facepalm).
- Configuration management made slightly simple.
- Bandit linter removed as useless.
- More instructions for the package developers in the
README.md
added.
- Example improved to show how to handle HTTP auth (#23).
- Better error message when Channels channel layer is not available.
- Context (
info.context
in resolvers) lifetime has changed. It is now an object-like wrapper around Channels scope typically available asself.scope
in the Channels consumers. So you can access Channels scope asinfo.context
. Modifications made ininfo.context
are stored in the Channels scope, so they are persisted as long as WebSocket connection lives. You can work withinfo.context
both as withdict
or as withSimpleNamespace
.
- Added support for GraphQL middleware, look at the
GraphqlWsConsumer.middleware
setting. - Example reworked to illustrate how to authenticate clients.
- Channels
scope
is now stored ininfo.context.scope
asdict
. (Previouslyinfo.context
was a copy ofscope
wrapped into thetypes.SimpleNamespace
). The thing is the GraphQLinfo.context
and Channelsscope
are different things. Theinfo.context
is a storage for a single GraphQL operation, whilescope
is a storage for the whole WebSocket connection. For example now useinfo.context.scope["user"]
to get access to the Django user model.
- Changelog eventually added.
GraphqlWsClient
transport timeout increased 5->60 seconds.- Dependency problem fixed, version numbers frozen in
poetry.lock
file for non-development dependencies. - Tests which failed occasionally due to wrong DB misconfiguration.