Skip to content

context manager bug #33

@bennnym

Description

@bennnym

running the simple example on the homepage

from graphql_client import GraphQLClient


def callback(_id, data):
  print("got new data..")
  print(f"msg id: {_id}. data: {data}")

with GraphQLClient(endpoint) as client:
  sub_id = client.subscribe(subscription,
                            # variables={'limit': 10},
                            headers=new_header,
                            callback=callback)
  
  client.stop_subscribe(sub_id)

returns the following:

raceback (most recent call last):
  File "dro_auth.py", line 91, in <module>
    with GraphQLClient(endpoint) as client:
AttributeError: __enter__

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions