Patch#
You can put manualy some data in a store (and the associated cache). This is usefull for:
- Optimistic UI
- 1/ You patch with some data you belive will be true
- 2/ You do a mutation
- 3/ You patch with the result of the mutation
- Partial Result & Navigation
- 1/ You have a list of
Post.title
and you want to navigate to the detail of the post - 2/ Arriving on the detail page, you patch with the title
- 3/ You do the detail query in the background
- 4/ When data comes back, it will automatically update the store!
- 1/ You have a list of
KQL_AllContinents.patch({ continents: [{ name: 'JYC Land', code: 'JYC' }] })