Add optimistic rendering for tasks (#1140)

* Add optimistic rendering for tasks

* Refetch activities for lists updates
This commit is contained in:
Emilien Chauvet
2023-08-09 20:05:08 +02:00
committed by GitHub
parent 702b6e5154
commit db8a176342
5 changed files with 109 additions and 37 deletions

View File

@ -60,24 +60,30 @@ export const DELETE_ACTIVITY = gql`
}
`;
export const ACTIVITY_UPDATE_FRAGMENT = gql`
fragment ActivityUpdateParts on Activity {
id
body
title
type
completedAt
dueAt
assignee {
id
firstName
lastName
displayName
}
}
`;
export const UPDATE_ACTIVITY = gql`
mutation UpdateActivity(
$where: ActivityWhereUniqueInput!
$data: ActivityUpdateInput!
) {
updateOneActivity(where: $where, data: $data) {
id
body
title
type
completedAt
dueAt
assignee {
id
firstName
lastName
displayName
}
...ActivityUpdateParts
}
}
`;