feature/IO-3225-Notifications-1.5: DB Changes

This commit is contained in:
Dave Richer
2025-05-05 15:02:44 -04:00
parent 2deb7fd520
commit 8109a12898
8 changed files with 292 additions and 20 deletions

View File

@@ -2928,3 +2928,33 @@ exports.INSERT_NEW_DOCUMENT = `
}
}
`;
exports.GET_AUTOADD_NOTIFICATION_USERS = `
query GET_AUTOADD_NOTIFICATION_USERS($shopId: uuid!) {
bodyshops_by_pk(id: $shopId) {
id
notification_followers
}
associations(where: {
_and: [
{ shopid: { _eq: $shopId } },
{ active: { _eq: true } },
{ notifications_autoadd: { _eq: true } }
]
}) {
id
useremail
}
}
`;
exports.INSERT_JOB_WATCHERS = `
mutation INSERT_JOB_WATCHERS($watchers: [job_watchers_insert_input!]!) {
insert_job_watchers(objects: $watchers) {
affected_rows
returning {
user_email
}
}
}
`;