Skip to content

Latest commit

History

History
8 lines (7 loc) 路 644 Bytes

2021-07-26.md

File metadata and controls

8 lines (7 loc) 路 644 Bytes
publish_date
2021-07-26
  • Fun with the apollo cache today. My man Ben Awad with knowledge again. Basicly three ways to utalise the apollo cache
    • adding a new record automatically updates the apollo cache
    • adding a refetch policy on on mutations forces the cache to update, however this means there are two network requests. not the end of the world...
    • you can manually ammend the apollo cache on mutation with the update callback, within this callback you have access to the cache object which has some additional methods you can utalised like edit and writeQuery.