Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}
graphqlPubsub.publish(data.trigger, { [data.trigger]: data.payload });
}
if (action === 'activityLog') {
ActivityLogs.createLogFromWidget(data.type, data.payload);
}
};
const convertPubSubBuffer = (data: Buffer) => {
return JSON.parse(data.toString());
};
const subscriber = new cote.Subscriber(
{ name: 'erxes-api' },
{
log: false,
statusLogsEnabled: false,
},
);
subscriber.on('widgetNotification', data => {
publishMessage(JSON.parse(data));
});
export const graphqlPubsub = createPubsubInstance();