import gql from "graphql-tag";

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
      }
    }
  }
`;