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 INSERT_ALLOCATION = gql`
|
||||
mutation INSERT_ALLOCATION($alloc: [allocations_insert_input!]!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
||||
query QUERY_ALL_ACTIVE_APPOINTMENTS {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_ALL_ASSOCIATIONS = gql`
|
||||
query QUERY_ALL_ASSOCIATIONS {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_AUDIT_TRAIL = gql`
|
||||
query QUERY_AUDIT_TRAIL($id: uuid!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_AVAILABLE_NEW_JOBS = gql`
|
||||
query QUERY_AVAILABLE_NEW_JOBS {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_BODYSHOP = gql`
|
||||
query QUERY_BODYSHOP {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const INSERT_NEW_CONTRACT = gql`
|
||||
mutation INSERT_NEW_CONTRACT($contract: [cccontracts_insert_input!]!) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const INSERT_NEW_COURTESY_CAR = gql`
|
||||
mutation INSERT_NEW_COURTESY_CAR(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const GET_DOCUMENTS_BY_JOB = gql`
|
||||
query GET_DOCUMENTS_BY_JOB($jobId: uuid!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_EMPLOYEES = gql`
|
||||
query QUERY_EMPLOYEES {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const INSERT_NEW_INVOICE = gql`
|
||||
mutation INSERT_NEW_INVOICE($invoice: [invoices_insert_input!]!) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const INSERT_CONVERSATION_TAG = gql`
|
||||
mutation INSERT_CONVERSATION_TAG($conversationId: uuid!, $jobId: uuid!) {
|
||||
insert_job_conversations(
|
||||
objects: { conversationid: $conversationId, jobid: $jobId }
|
||||
on_conflict: { constraint: job_conversations_pkey, update_columns: jobid }
|
||||
) {
|
||||
returning {
|
||||
jobid
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const GET_JOB_LINES_BY_PK = gql`
|
||||
query GET_JOB_LINES_BY_PK($id: uuid!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_ALL_ACTIVE_JOBS = gql`
|
||||
query QUERY_ALL_ACTIVE_JOBS($statuses: [String!]!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const MARK_MESSAGES_AS_READ_BY_CONVERSATION = gql`
|
||||
mutation MARK_MESSAGES_AS_READ_BY_CONVERSATION($conversationId: uuid) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const GET_LANDING_NAV_ITEMS = gql`
|
||||
query nav_items {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const INSERT_NEW_NOTE = gql`
|
||||
mutation INSERT_NEW_NOTE($noteInput: [notes_insert_input!]!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_SEARCH_OWNER_BY_IDX = gql`
|
||||
query QUERY_SEARCH_OWNER_BY_IDX($search: String!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const INSERT_NEW_PARTS_ORDERS = gql`
|
||||
mutation INSERT_NEW_PARTS_ORDERS($po: [parts_orders_insert_input!]!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_TEMPLATES_BY_NAME = gql`
|
||||
query QUERY_TEMPLATES_BY_NAME($name: String!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_TICKETS_BY_JOBID = gql`
|
||||
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const UPSERT_USER = gql`
|
||||
mutation UPSERT_USER($authEmail: String!, $authToken: String!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_VEHICLE_BY_ID = gql`
|
||||
query QUERY_VEHICLE_BY_ID($id: uuid!) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gql } from "apollo-boost";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_VENDOR_BY_ID = gql`
|
||||
query QUERY_VENDOR_BY_ID($id: uuid!) {
|
||||
|
||||
Reference in New Issue
Block a user