feature/IO-3000-messaging-sockets-migration2 -
- Various work Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -346,8 +346,13 @@ export const registerMessagingHandlers = ({ socket, client }) => {
|
||||
client.cache.modify({
|
||||
id: client.cache.identify({ __typename: "conversations", id: conversationId }),
|
||||
fields: {
|
||||
job_conversations: (existing = [], { readField }) =>
|
||||
existing.filter((jobRef) => readField("jobid", jobRef) !== fields.jobId)
|
||||
job_conversations: (existing = [], { readField }) => {
|
||||
return existing.filter((jobRef) => {
|
||||
// Read the `jobid` field safely, even if the structure is normalized
|
||||
const jobId = readField("jobid", jobRef);
|
||||
return jobId !== fields.jobId;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user