Moving queries into dedicated files (#1210)
* Moving queries into dedicated files * fix ci
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_FAVORITE = gql`
|
||||
mutation DeleteFavorite($where: FavoriteWhereInput!) {
|
||||
deleteFavorite(where: $where) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -0,0 +1,14 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const INSERT_COMPANY_FAVORITE = gql`
|
||||
mutation InsertCompanyFavorite($data: FavoriteMutationForCompanyArgs!) {
|
||||
createFavoriteForCompany(data: $data) {
|
||||
id
|
||||
company {
|
||||
id
|
||||
name
|
||||
domainName
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -0,0 +1,15 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const INSERT_PERSON_FAVORITE = gql`
|
||||
mutation InsertPersonFavorite($data: FavoriteMutationForPersonArgs!) {
|
||||
createFavoriteForPerson(data: $data) {
|
||||
id
|
||||
person {
|
||||
id
|
||||
firstName
|
||||
lastName
|
||||
displayName
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
25
front/src/modules/favorites/graphql/queries/getFavorites.ts
Normal file
25
front/src/modules/favorites/graphql/queries/getFavorites.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_FAVORITES = gql`
|
||||
query GetFavorites {
|
||||
findFavorites {
|
||||
id
|
||||
person {
|
||||
id
|
||||
firstName
|
||||
lastName
|
||||
avatarUrl
|
||||
}
|
||||
company {
|
||||
id
|
||||
name
|
||||
domainName
|
||||
accountOwner {
|
||||
id
|
||||
displayName
|
||||
avatarUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user