Added notification generation on SMS. Added FCM Token saving on login.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { gql } from "apollo-boost";
|
||||
|
||||
export const UPSERT_USER = gql`
|
||||
mutation upsert_user($authEmail: String!, $authToken: String!) {
|
||||
mutation UPSERT_USER($authEmail: String!, $authToken: String!) {
|
||||
insert_users(
|
||||
objects: [{ email: $authEmail, authid: $authToken }]
|
||||
on_conflict: { constraint: users_pkey, update_columns: [authid] }
|
||||
@@ -12,3 +12,17 @@ export const UPSERT_USER = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_FCM_TOKEN = gql`
|
||||
mutation UPDATE_FCM_TOKEN($authEmail: String!, $token: jsonb!) {
|
||||
update_users(
|
||||
where: { email: { _eq: $authEmail } }
|
||||
_append: { fcmtokens: $token }
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
fcmtokens
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user