Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
props: ({ countData }: any) => {
const newlog = logger.child({ childName: 'UIController' });
newlog.debug('count data : (%j)', countData);
return {
subscribeToCount: params => {
// logger.debug('count subscript data (%j)', params);
return countData.subscribeToMore({
document: COUNT_SUBSCRIPTION,
variables: {},
updateQuery: (prev: any, { subscriptionData }) => {
const payload = subscriptionData.data && subscriptionData.data.subscribeToWorkspace;
if (!payload) {
return prev;
}
return payload;
},
});
},