Skip to content

Releases: datadvance/DjangoChannelsGraphqlWs

v0.4.0

20 Aug 14:51
Compare
Choose a tag to compare
  • Context (info.context in resolvers) lifetime has changed. It is now an object-like wrapper around Channels 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.

v0.3.0

16 Aug 22:12
Compare
Choose a tag to compare
  • 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.

v0.2.1

13 Aug 22:30
Compare
Choose a tag to compare
  • 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.