BOD-118 Added Saga to start conversations from anywhere. Removed gql apollo-boost due to package size and replaced with graphql-tag
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const CONVERSATION_LIST_SUBSCRIPTION = gql`
|
||||
subscription CONVERSATION_LIST_SUBSCRIPTION {
|
||||
@@ -45,3 +45,21 @@ export const CONVERSATION_SUBSCRIPTION_BY_PK = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CONVERSATION_ID_BY_PHONE = gql`
|
||||
query CONVERSATION_ID_BY_PHONE($phone: String!) {
|
||||
conversations(where: { phone_num: { _eq: $phone } }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CREATE_CONVERSATION = gql`
|
||||
mutation CREATE_CONVERSATION($conversation: [conversations_insert_input!]!) {
|
||||
insert_conversations(objects: $conversation) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user