Skip to content

detect disconnect #53

Description

@unimonkiez
  • GraphQL AioWS version: 0.3.1
  • Python version: 3.8.6
  • Operating System: MacOS Catalina

Description

Trying to figure out how to know when someone isn't subscribed anymore.

What I Did

Ran the example which works great but unable to know when someone is disconnected..

importasyncioimportgrapheneclassSubscription(graphene.ObjectType):
count_seconds=graphene.Float(up_to=graphene.Int())
asyncdefresolve_count_seconds(root, info, up_to=5):
foriinrange(up_to):
print("YIELD SECOND", i)
yieldiawaitasyncio.sleep(1.)
yieldup_toschema=graphene.Schema(subscription=Subscription)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions