DjangoChannelsGraphqlWs

Django Channels based WebSocket GraphQL server with Graphene-like subscriptions

MIT License

Downloads
14.9K
Stars
280
Committers
13

Bot releases are visible (Hide)

DjangoChannelsGraphqlWs - v1.0.0rc7

Published by prokher 3 months ago

Supported the most recent WebSocket sub-protocol graphql-transport-ws used by Apollo. See the specification https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md.

DjangoChannelsGraphqlWs - 1.0.0rc6 Latest Release

Published by prokher over 1 year ago

  • GraphQL parsing and message serialization now perform concurrently by sync_to_async(...,thread_sensitive=False).
DjangoChannelsGraphqlWs - 1.0.0rc5

Published by prokher over 1 year ago

WARNING: Release contains backward incompatible changes!

  • To suppress/drop subscription notification just return None from the subscription resolver. Previously it was necessary to return special SKIP object which is no longer the case..
  • Python 3.8 compatibility brought back. Tests pass OK.
DjangoChannelsGraphqlWs - v1.0.0rc4

Published by prokher over 1 year ago

  • GraphqlWsConsumer.warn_resolver_timeout removed to avoid mess with user specified middlewares. This functionality can easily be implemented on the library user level by creating a designated middleware.
  • GraphqlWsConsumer.middleware accepts an instance of graphql.MiddlewareManager or the list of functions. Same as the argument middleware of graphql.execute method.
  • Fixed broken example.
DjangoChannelsGraphqlWs - v1.0.0rc3

Published by prokher over 1 year ago

  • Invoke synchronous resolvers in the main thread with eventloop. So there is no difference in this aspect with async resolvers. This corresponds to the behavior of the graphql-core library.
  • Added example of middleware which offloads synchronous resolvers to the threadpool.
  • Fixed bug with GraphQL WrappingTypes like GraphQLNonNull causing exceptions when used as subscription field.
  • Fixed broken example.
DjangoChannelsGraphqlWs - v1.0.0rc2

Published by prokher over 1 year ago

Broken support of previous Python version brought back.

DjangoChannelsGraphqlWs - v1.0.0rc1

Published by prokher over 1 year ago

  • DjangoChannelsGraphqlWs has migrated to the recent versions of Django, Channels, and Graphene. All other Python dependencies updated.
  • Server outputs a warning to the log when operation/resolver takes longer than specified timeout, which is one second by default. The settings GraphqlWsConsumer.warn_operation_timeout and GraphqlWsConsumer.warn_resolver_timeout allow to tune the timeout or even disable the warning at all.
  • If exception raises from the resolver a response now contains a field "extensions.code" with a class name of the exception.
  • Added support for async resolvers and middlewares.
  • WARNING: This release is not backward compatible with previous ones! The main cause is a major update of Django, Channels, and Graphene, but there are some introduced by the library itself. In particular, context lifetime and content have changed. See README.md for details.
DjangoChannelsGraphqlWs - v0.9.1

Published by stmarkevich over 2 years ago

  • Minor fix in logging.
DjangoChannelsGraphqlWs - v0.9.0

Published by sergey-komissarov about 3 years ago

  • Added ability to configure server notification queue limit per subscribtion.
DjangoChannelsGraphqlWs -

Published by prokher over 3 years ago

  • Switched to Channels 3.
  • Python dependencies updated.
DjangoChannelsGraphqlWs -

Published by prokher almost 4 years ago

  • Django channel name added to the context as the channel_name record.
  • Python dependencies updated.
DjangoChannelsGraphqlWs - v0.7.4

Published by prokher about 4 years ago

Client method 'execute' consumes 'complete' message in case of error.

DjangoChannelsGraphqlWs -

Published by prokher about 4 years ago

Logging slightly improved. Thanks to @edouardtheron.

DjangoChannelsGraphqlWs -

Published by prokher about 4 years ago

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 the ThreadPoolExecutor with default (by Python) number of threads. All this eventually ended up in hundreds of thread created for each GraphqlWsConsumer subclass.

DjangoChannelsGraphqlWs -

Published by prokher about 4 years ago

Python 3.6 compatibility brought back.

DjangoChannelsGraphqlWs -

Published by prokher about 4 years ago

Subscription payload now properly serializes the following Python datetime types:

  • datetime.datetime
  • datetime.date
  • datetime.time
DjangoChannelsGraphqlWs -

Published by prokher about 4 years ago

  • 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 by graphene anyway.
  • Many CI-related fixes.
DjangoChannelsGraphqlWs - v0.5.0

Published by prokher over 4 years ago

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

Published by prokher about 5 years ago

  • Example improved to show how to handle HTTP auth (#23).
DjangoChannelsGraphqlWs -

Published by prokher about 5 years ago

  • Better error message when Channels channel layer is not available.