Moving queries into dedicated files (#1210)

* Moving queries into dedicated files

* fix ci
This commit is contained in:
Weiko
2023-08-14 19:31:20 -07:00
committed by GitHub
parent 656f1af15c
commit 24e5132029
149 changed files with 2908 additions and 3094 deletions

View File

@ -0,0 +1,30 @@
import { gql } from '@apollo/client';
export const GET_PEOPLE = gql`
query GetPeople(
$orderBy: [PersonOrderByWithRelationInput!]
$where: PersonWhereInput
$limit: Int
) {
people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
id
phone
email
city
firstName
lastName
displayName
jobTitle
linkedinUrl
xUrl
avatarUrl
createdAt
_activityCount
company {
id
name
domainName
}
}
}
`;

View File

@ -0,0 +1,35 @@
import { gql } from '@apollo/client';
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
}
}
}
}
`;

View File

@ -0,0 +1,10 @@
import { gql } from '@apollo/client';
export const GET_PERSON_CITY = gql`
query GetPersonCityById($id: String!) {
person: findUniquePerson(id: $id) {
id
city
}
}
`;

View File

@ -0,0 +1,10 @@
import { gql } from '@apollo/client';
export const GET_PERSON_COMMENT_COUNT = gql`
query GetPersonCommentCountById($id: String!) {
person: findUniquePerson(id: $id) {
id
_activityCount
}
}
`;

View File

@ -0,0 +1,14 @@
import { gql } from '@apollo/client';
export const GET_PERSON_COMPANY = gql`
query GetPersonCompanyById($id: String!) {
person: findUniquePerson(id: $id) {
id
company {
id
name
domainName
}
}
}
`;

View File

@ -0,0 +1,10 @@
import { gql } from '@apollo/client';
export const GET_PERSON_CREATED_AT = gql`
query GetPersonCreatedAtById($id: String!) {
person: findUniquePerson(id: $id) {
id
createdAt
}
}
`;

View File

@ -0,0 +1,10 @@
import { gql } from '@apollo/client';
export const GET_PERSON_EMAIL = gql`
query GetPersonEmailById($id: String!) {
person: findUniquePerson(id: $id) {
id
email
}
}
`;

View File

@ -0,0 +1,13 @@
import { gql } from '@apollo/client';
export const GET_PERSON_NAMES_AND_COMMENT_COUNT = gql`
query GetPersonNamesAndCommentCountById($id: String!) {
person: findUniquePerson(id: $id) {
id
firstName
lastName
displayName
_activityCount
}
}
`;

View File

@ -0,0 +1,10 @@
import { gql } from '@apollo/client';
export const GET_PERSON_PHONE = gql`
query GetPersonPhoneById($id: String!) {
person: findUniquePerson(id: $id) {
id
phone
}
}
`;