Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom payload return type #78

Open
MedNabilEssefaihi opened this issue Nov 18, 2021 · 0 comments
Open

Custom payload return type #78

MedNabilEssefaihi opened this issue Nov 18, 2021 · 0 comments

Comments

@MedNabilEssefaihi
Copy link

Dear There,

I am trying to return new type in publish payload but it doesn't return nothing

class Add_Todo():
 .....
 toDo.save()
 Subscription_Todo.broadcast(payload=toDo)

class Subscription_Todo(channels_graphql_ws.Subscription):

    data = graphene.Field(Type_TODO)

    @staticmethod
    def subscribe(root, info):
        pass

    @staticmethod
    def publish(payload, info):
        print(payload)
        return Subscription_Ticket(data =payload)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant