Merge pull request #1527 from riccardobl/urfh

Prevent UPDATE_COMMENT from invalidating the cache of child comments (Fix #1509 )
This commit is contained in:
Keyan 2024-11-02 16:52:04 -05:00 committed by GitHub
commit 193ceefc58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 2 deletions

View File

@ -29,6 +29,18 @@ const ITEM_PAID_ACTION_FIELDS = gql`
}
}`
const ITEM_PAID_ACTION_FIELDS_NO_CHILD_COMMENTS = gql`
${COMMENTS}
fragment ItemPaidActionFieldsNoChildComments on ItemPaidAction {
result {
id
deleteScheduledAt
reminderScheduledAt
...CommentFields
}
}
`
const ITEM_ACT_PAID_ACTION_FIELDS = gql`
fragment ItemActPaidActionFields on ItemActPaidAction {
result {
@ -226,11 +238,11 @@ export const CREATE_COMMENT = gql`
}`
export const UPDATE_COMMENT = gql`
${ITEM_PAID_ACTION_FIELDS}
${ITEM_PAID_ACTION_FIELDS_NO_CHILD_COMMENTS}
${PAID_ACTION}
mutation upsertComment($id: ID!, $text: String!, $boost: Int, ${HASH_HMAC_INPUT_1}) {
upsertComment(id: $id, text: $text, boost: $boost, ${HASH_HMAC_INPUT_2}) {
...ItemPaidActionFields
...ItemPaidActionFieldsNoChildComments
...PaidActionFields
}
}`