BOD-14 Backend server work + sending of messages WIP for front end
This commit is contained in:
23
server/graphql-client/queries.js
Normal file
23
server/graphql-client/queries.js
Normal file
@@ -0,0 +1,23 @@
|
||||
exports.FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID = `
|
||||
query FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID(
|
||||
$mssid: String!
|
||||
$phone: String!
|
||||
) {
|
||||
bodyshops(where: { messagingservicesid: { _eq: $mssid } }) {
|
||||
id
|
||||
conversations(where: { phone_num: { _eq: $phone } }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
exports.INSERT_MESSAGE = `
|
||||
mutation INSERT_MESSAGE($msg: [messages_insert_input!]!) {
|
||||
insert_messages(objects: $msg) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user