graphql-prisma-typescript icon indicating copy to clipboard operation
graphql-prisma-typescript copied to clipboard

subscription confusion

Open tzjoke opened this issue 6 years ago • 1 comments

Hi, I want to refactor my app with ts and i am quite confused with the subscription described in this example. I am used to using subscribe and resolve in subscription, like below:

const Subscription = {
    fooSub: {
        subscribe: 
        resolve:
    },
}

And in this example it is like

const Subscription: SubscriptionResolvers.Type<TypeMap> = {
    fooSub: parent => null
};

Can someone explain the flow here? Thanks in advance.

tzjoke avatar Dec 17 '18 10:12 tzjoke

Hey man, have you figured it out ? I'm refactoring my graphql server code to use typescript and I decided to use the same way as this app, but I can't get the subscriptions to work.

Sampite avatar Jul 23 '19 18:07 Sampite