import { gql } from "apollo-boost";

export const UPSERT_USER = gql`
  mutation upsert_user($authEmail: String!, $authToken: String!) {
    insert_users(
      objects: [{ email: $authEmail, authid: $authToken }]
      on_conflict: { constraint: users_pkey, update_columns: [authid] }
    ) {
      returning {
        authid
      }
    }
  }
`;
