31 lines
738 B
JavaScript
31 lines
738 B
JavaScript
import gql from "graphql-tag";
|
|
|
|
export const INSERT_CONVERSATION_TAG = gql`
|
|
mutation INSERT_CONVERSATION_TAG($conversationId: uuid!, $jobId: uuid!) {
|
|
insert_job_conversations(
|
|
objects: { conversationid: $conversationId, jobid: $jobId }
|
|
on_conflict: { constraint: job_conversations_pkey, update_columns: jobid }
|
|
) {
|
|
returning {
|
|
jobid
|
|
conversationid
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const REMOVE_CONVERSATION_TAG = gql`
|
|
mutation REMOVE_CONVERSATION_TAG($conversationId: uuid!, $jobId: uuid!) {
|
|
delete_job_conversations(
|
|
where: {
|
|
_and: {
|
|
jobid: { _eq: $jobId }
|
|
conversationid: { _eq: $conversationId }
|
|
}
|
|
}
|
|
) {
|
|
affected_rows
|
|
}
|
|
}
|
|
`;
|