Skip to content

Commit

Permalink
chore: invalidate microlearnings in cache on publish and unpublish
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschlapbach committed Sep 18, 2024
1 parent 6bb2b9b commit 13905f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/graphql/src/services/microLearning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ export async function publishMicroLearning(
},
})

ctx.emitter.emit('invalidate', { typename: 'MicroLearning', id })

return microLearning
}

Expand Down Expand Up @@ -332,6 +334,8 @@ export async function unpublishMicroLearning(
},
})

ctx.emitter.emit('invalidate', { typename: 'MicroLearning', id })

return microLearning
}

Expand Down

0 comments on commit 13905f2

Please sign in to comment.