Notes lifecycle events added to job details.

This commit is contained in:
Patrick Fic
2020-01-21 15:11:04 -08:00
parent 26745f2e62
commit 4bac820887
14 changed files with 546 additions and 90 deletions

View File

@@ -9,3 +9,41 @@ export const INSERT_NEW_NOTE = gql`
}
}
`;
export const QUERY_NOTES_BY_JOB_PK = gql`
query QUERY_NOTES_BY_JOB_PK($id: uuid!) {
jobs_by_pk(id: $id) {
id
notes {
created_at
created_by
critical
id
jobid
private
text
updated_at
}
}
}
`;
export const UPDATE_NOTE = gql`
mutation UPDATE_NOTE($noteId: uuid!, $note: notes_set_input!) {
update_notes(where: { id: { _eq: $noteId } }, _set: $note) {
returning {
id
}
}
}
`;
export const DELETE_NOTE = gql`
mutation DELETE_NOTE($noteId: uuid!) {
delete_notes(where: { id: { _eq: $noteId } }) {
returning {
id
}
}
}
`;