import { gql } from '@apollo/client/core';
import type { User } from '../../../app';

export const ME_QUERY = gql`
	query Me {
		me {
			__typename
			... on TeamProfileType {
				id
				fullName
				email
				phone
				role
			}
			... on CustomerProfileType {
				id
				fullName
				email
				phone
				customers {
					id
					name
				}
			}
		}
	}
`;

export interface MeQueryResult {
	me: User | null;
}
