jaydenwindle / graphene-subscriptions

A plug-and-play GraphQL subscription implementation for Graphene + Django built using Django Channels.
MIT License
115 stars 15 forks source link

Channel events for models don't seem to be kicking off #24

Closed techknowfile closed 4 years ago

techknowfile commented 4 years ago

I have two sandbox projects with graphene_subscriptions setup.

One of them works perfectly. When I create a new instance of a model and .save() it, GraphQL playground receives the expected info from the subscription.

One of them works for the "resolve_hello" example, but never kicks off the callback function when my model is created. It does successfully go through the AppConfig import api.signals call in ready(), which calls the post_save.connect and post_delete.connect functions for the model.

The primary difference between these two projects is that one of them uses Sql Server (the working project), and the other uses sqlite (not-working project). Is there any reason that sqlite wouldn't initiate the post_save_subscription?

jaydenwindle commented 4 years ago

Hey @techknowfile 👋

I'm guessing since you closed this issue that you got it working. I'm curious - what was the solution that fixed it for you?

Let me know if you run into any more issues :)

techknowfile commented 4 years ago

My only guess is that I hadn't restarted my django shell that I was using to create the db entries :facepalm: