felicity-lims/webapp/graphql/operations/notice.mutations.ts

74 lines
1.7 KiB
TypeScript
Raw Normal View History

2023-11-10 14:05:15 +08:00
import gql from 'graphql-tag';
export const ADD_NOTICE = gql`
mutation AddNotice($payload: NoticeInputType!) {
createNotice(payload: $payload) {
... on NoticeType {
__typename
uid
title
body
expiry
createdByUid
departments {
uid
name
}
groups {
uid
name
}
}
... on OperationError {
__typename
error
suggestion
}
}
}
`;
export const EDIT_NOTICE = gql`
mutation editNotice($uid: String!, $payload: NoticeInputType!) {
updateNotice(uid: $uid, payload: $payload) {
... on NoticeType {
__typename
uid
title
body
expiry
createdByUid
departments {
uid
name
}
groups {
uid
name
}
}
... on OperationError {
__typename
error
suggestion
}
}
}
`;
export const DELETE_NOTICE = gql`
mutation deleteNotice($uid: String!) {
deleteNotice(uid: $uid) {
... on DeletedItem {
__typename
uid
}
... on OperationError {
__typename
error
suggestion
}
}
}
`;