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,19 @@
import { gql } from '@apollo/client';
export const SEARCH_ACTIVITY_QUERY = gql`
query SearchActivity(
$where: ActivityWhereInput
$limit: Int
$orderBy: [ActivityOrderByWithRelationInput!]
) {
searchResults: findManyActivities(
where: $where
take: $limit
orderBy: $orderBy
) {
id
title
body
}
}
`;

View File

@ -0,0 +1,17 @@
import { gql } from '@apollo/client';
export const SEARCH_COMPANY_QUERY = gql`
query SearchCompany(
$where: CompanyWhereInput
$limit: Int
$orderBy: [CompanyOrderByWithRelationInput!]
) {
searchResults: findManyCompany(
where: $where
take: $limit
orderBy: $orderBy
) {
...CompanyFieldsFragment
}
}
`;

View File

@ -0,0 +1,25 @@
import { gql } from '@apollo/client';
export const SEARCH_PEOPLE_QUERY = gql`
query SearchPeople(
$where: PersonWhereInput
$limit: Int
$orderBy: [PersonOrderByWithRelationInput!]
) {
searchResults: findManyPerson(
where: $where
take: $limit
orderBy: $orderBy
) {
id
phone
email
city
firstName
lastName
displayName
avatarUrl
createdAt
}
}
`;

View File

@ -0,0 +1,22 @@
import { gql } from '@apollo/client';
export const SEARCH_USER_QUERY = gql`
query SearchUser(
$where: UserWhereInput
$limit: Int
$orderBy: [UserOrderByWithRelationInput!]
) {
searchResults: findManyUser(
where: $where
take: $limit
orderBy: $orderBy
) {
id
email
displayName
firstName
lastName
avatarUrl
}
}
`;

View File

@ -1,88 +0,0 @@
import { gql } from '@apollo/client';
export const SEARCH_PEOPLE_QUERY = gql`
query SearchPeople(
$where: PersonWhereInput
$limit: Int
$orderBy: [PersonOrderByWithRelationInput!]
) {
searchResults: findManyPerson(
where: $where
take: $limit
orderBy: $orderBy
) {
id
phone
email
city
firstName
lastName
displayName
avatarUrl
createdAt
}
}
`;
export const SEARCH_USER_QUERY = gql`
query SearchUser(
$where: UserWhereInput
$limit: Int
$orderBy: [UserOrderByWithRelationInput!]
) {
searchResults: findManyUser(
where: $where
take: $limit
orderBy: $orderBy
) {
id
email
displayName
firstName
lastName
avatarUrl
}
}
`;
// TODO: remove this query
export const EMPTY_QUERY = gql`
query EmptyQuery {
searchResults: findManyUser {
id
}
}
`;
export const SEARCH_COMPANY_QUERY = gql`
query SearchCompany(
$where: CompanyWhereInput
$limit: Int
$orderBy: [CompanyOrderByWithRelationInput!]
) {
searchResults: findManyCompany(
where: $where
take: $limit
orderBy: $orderBy
) {
...CompanyFieldsFragment
}
}
`;
export const SEARCH_ACTIVITY_QUERY = gql`
query SearchActivity(
$where: ActivityWhereInput
$limit: Int
$orderBy: [ActivityOrderByWithRelationInput!]
) {
searchResults: findManyActivities(
where: $where
take: $limit
orderBy: $orderBy
) {
id
title
body
}
}
`;