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,12 @@
import { gql } from '@apollo/client';
export const GET_ACTIVITIES = gql`
query GetActivities(
$where: ActivityWhereInput!
$orderBy: [ActivityOrderByWithRelationInput!]
) {
findManyActivities(orderBy: $orderBy, where: $where) {
...ActivityQueryFragment
}
}
`;

View File

@ -0,0 +1,24 @@
import { gql } from '@apollo/client';
export const GET_ACTIVITIES_BY_TARGETS = gql`
query GetActivitiesByTargets(
$activityTargetIds: [String!]!
$orderBy: [ActivityOrderByWithRelationInput!]
) {
findManyActivities(
orderBy: $orderBy
where: {
activityTargets: {
some: {
OR: [
{ personId: { in: $activityTargetIds } }
{ companyId: { in: $activityTargetIds } }
]
}
}
}
) {
...ActivityQueryFragment
}
}
`;

View File

@ -0,0 +1,9 @@
import { gql } from '@apollo/client';
export const GET_ACTIVITY = gql`
query GetActivity($activityId: String!) {
findManyActivities(where: { id: { equals: $activityId } }) {
...ActivityQueryFragment
}
}
`;