Open ubbop42 opened 5 years ago
Is there a way to trigger a function on when the client unsubscribes to a specific subscription Something like this, but I know this doesn't work
HomesSubscription: { subscribe: (rootValue: any, args: any, context: any) => { startHomeSub(context.token,context.env) return pubsub.asyncIterator('Homes_Changed') }, unsubscribe: () => { stopHomeSub() }, },
Have you looked at https://github.com/apollographql/graphql-subscriptions/issues/141 ?
Is there a way to trigger a function on when the client unsubscribes to a specific subscription Something like this, but I know this doesn't work
HomesSubscription: { subscribe: (rootValue: any, args: any, context: any) => { startHomeSub(context.token,context.env) return pubsub.asyncIterator('Homes_Changed') }, unsubscribe: () => { stopHomeSub() }, },