Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(root, args, context: IGraphQLContext) => {
if (!context.player || !context.game) {
return createRejectionIterable(new Error('Invalid player, cant subscribe to the current game'))
}
return pubsub.asyncIterator(ESubscriptionTopics.GAME_STATE_CHANGED)
},
(payload, args, context) => {