* Adding the favorite button * favorites services and resolvers * favorites schema * favorite ability handler * favorite module export * front end UI * front end graphql additions * server ability handlers * server resolvers and services * css fix * Adding the favorite button * favorites services and resolvers * favorites schema * favorite ability handler * favorite module export * front end UI * front end graphql additions * server ability handlers * server resolvers and services * css fix * delete favorites handler and resolver * removed favorite from index list * chip avatar size props * index list additions * UI additions for favorites functionality * lint fixes * graphql codegen * UI fixes * favorite hook addition * moved to ~/modules * Favorite mapping to workspaceMember * graphql codegen * cosmetic changes * camel cased methods * graphql codegen
42 lines
680 B
TypeScript
42 lines
680 B
TypeScript
import { gql } from '@apollo/client';
|
|
|
|
import { useGetPersonQuery } from '~/generated/graphql';
|
|
|
|
export const GET_PERSON = gql`
|
|
query GetPerson($id: String!) {
|
|
findUniquePerson(id: $id) {
|
|
id
|
|
firstName
|
|
lastName
|
|
displayName
|
|
email
|
|
createdAt
|
|
city
|
|
jobTitle
|
|
linkedinUrl
|
|
xUrl
|
|
avatarUrl
|
|
phone
|
|
_activityCount
|
|
company {
|
|
id
|
|
name
|
|
domainName
|
|
}
|
|
Favorite {
|
|
id
|
|
person {
|
|
id
|
|
}
|
|
company {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export function usePersonQuery(id: string) {
|
|
return useGetPersonQuery({ variables: { id } });
|
|
}
|