question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with Model Create Subscriptions

See original GitHub issue

Hi @jaydenwindle,

I am using this package for subscriptions with graphene. I am facing an issue with the Model Create Subscriptions.

This is my Model Create Subscription, just as mentioned in the documentation:

class Subscription(graphene.ObjectType):

    fruit_created = graphene.Field(FruitsType)

    def resolve_fruit_created(root, info):
        return root.filter( 
            lambda event:
                event.operation == CREATED  and
                isinstance(event.instance, Fruits)
        ).map(lambda event: event.instance)

I am testing this in GraphQL Playground.

I keep my subscription running, which is:

subscription {
  fruitCreated
  {
    id
    name
    description
  }}

And I create a new model instance:

mutation{
  createFruit(
    name: "Grape",
    description: "Green/Purple color",
    id: 2
  ){
    fruit
    {
      id
      name
      description
    }
  }
}

But my subscription isn’t returning anything and it just keeps on listening.

The basic hello world! subscription is working properly though.

So what could be the issue? Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
AanandhiVBcommented, Apr 20, 2020

Hi @jaydenwindle!

I apologize for not informing this earlier but I got the issue fixed.

@johnpaul89 thread helped me : https://github.com/jaydenwindle/graphene-subscriptions/issues/1#issuecomment-587926673

Everything is working now and once again thank you for this awesome package.

0reactions
jaydenwindlecommented, Jul 15, 2020

@Cimmanuel Ah, ok! I should probably make sure that is documented more clearly. Glad you got it working 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 issues to resolve before switching to a subscription business ...
Legacy companies accustomed to pay-as-you-go models may assume shifting to a subscription model is just a sales issue. They are wrong.
Read more >
3 Reasons Subscription Services Fail
3 Reasons Subscription Services Fail · More Than Recurring Revenue · 1. Too Many Steps to Psychological Relief · 2. Not Offering Enough...
Read more >
Top 4 Challenges To Effectively Scaling A Subscription Based ...
1. Revenue Recovery. If you bill monthly, you need to collect monthly. · 2. Revenue Leakage. Billing flexibility creates complexity for your accounting...
Read more >
The Challenges of a Subscription-based Business Model
A new perspective around ownership that prioritizes usage over acquisition of goods · Financial preferences for reducing the upfront acquisition ...
Read more >
13 Very Relatable Struggles Of The Subscription-Based ...
There are struggles subscription-based business model leaders the world over can relate to. Some are just frustrating, others have serious ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found