1
Fork 0

Add optimistic response for markFavorite

This commit is contained in:
viktorstrate 2020-06-19 15:56:04 +02:00
parent 9b6c9c3bd8
commit 26198d30e5
1 changed files with 7 additions and 0 deletions

View File

@ -139,6 +139,13 @@ export const Photo = ({
photoId: photo.id,
favorite: !photo.favorite,
},
optimisticResponse: {
favoritePhoto: {
id: photo.id,
favorite: !photo.favorite,
__typename: 'Photo',
},
},
})
}}
/>