Last active
June 10, 2020 01:24
-
-
Save dvtng/0bbc0db907ceb12932e7ff1d1e95bbba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { mutate, invalidate } = useRestable() | |
const orderRecord = await mutate( | |
OrderRecord.create({ /* payload */ }) | |
) | |
await invalidate( | |
// Invalidate the list of all OrderRecords | |
{ model: OrderRecord, many: true }, | |
// Invalidate the list of OrderRecords for this instrumentId | |
{ model: OrderRecord, many: true, params: { instrumentId } }, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment