import { ResponseManipulatorHandler } from '../../../cache-logic-interface';

export let messageQueryManipulator: ResponseManipulatorHandler = (cache, cacheKey, request) => {
  let messagesCacheRecord = cache.getCacheData('messages')?.[request.variables.resourceId];
  if (!messagesCacheRecord) return null;
  return messagesCacheRecord[request.variables.messageId] || null;
};
