Django-channels-graphql-ws

Latest version: v0.9.1

Safety actively analyzes 628924 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 4

0.4.0

- Context (`info.context` in resolvers) lifetime has changed. It is now
an object-like wrapper around [Channels
scope](https://channels.readthedocs.io/en/latest/topics/consumers.html#scope)
typically available as `self.scope` in the Channels consumers. So you
can access Channels scope as `info.context`. Modifications made in
`info.context` are stored in the Channels scope, so they are persisted
as long as WebSocket connection lives. You can work with
`info.context` both as with `dict` or as with `SimpleNamespace`.

0.3.0

- Added support for GraphQL middleware, look at the
`GraphqlWsConsumer.middleware` setting.
- Example reworked to illustrate how to authenticate clients.
- Channels `scope` is now stored in `info.context.scope` as `dict`.
(Previously `info.context` was a copy of `scope` wrapped into the
`types.SimpleNamespace`). The thing is the GraphQL `info.context` and
Channels `scope` are different things. The `info.context` is a storage
for a single GraphQL operation, while `scope` is a storage for the
whole WebSocket connection. For example now use
`info.context.scope["user"]` to get access to the Django user model.

0.2.1

- 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.

Page 4 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.