Refresh cache on mutation by fetching new data in mutation #196

Merged
Irev-Dev merged 2 commits from kurt/195 into main 2020-12-31 08:29:12 +01:00
2 changed files with 12 additions and 1 deletions

View File

@@ -49,6 +49,13 @@ const UPDATE_PART_MUTATION = gql`
updatePart: updatePart(id: $id, input: $input) {
id
title
description
code
mainImage
userId
Reaction {
emote
}
user {
id
userName

View File

@@ -187,9 +187,13 @@ const PartProfile = ({
{isEditable ? 'Markdown supported' : ''}
</div>
<div
id="description-wrap"
name="description"
className="markdown-overrides rounded-lg shadow-md bg-white px-12 py-6 min-h-md"
onClick={() => editorRef?.current?.focusAtEnd()}
onClick={(e) =>
e?.target?.id === 'description-wrap' &&
editorRef?.current?.focusAtEnd()
}
>
<Editor
ref={editorRef}