Replies: 1 comment 1 reply
-
did you add the middleware to your store? If you look at the cache entry in the RTK Query tab in the REdux devtools, does it have the tags you expect? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys. Can't make
createOrder
mutation to trigger invalidation ofgetOrder
endpoint.createOrder
creates a new Order object or modifies existing (by either adding new product toproductsInOrder
array or increasingamount
property of existing array element).The order object looks like this
but for some reason when a new order is created neither
getOrders
norgetOrder
endpoints get refetched and I don't understand why..getOrder
'sprovidesTags
id is exactly the same ascreateOrder
sinvalidatesTags
id.editOrder
anddeleteOrder
work just fine...Is nested objects that get mutated the problem?
How do I make sure
getOrder
is invalidated when a neworder
is created?Beta Was this translation helpful? Give feedback.
All reactions