You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In overrides\app\hooks\ShopperBaskets\mutation.ts
add hardcoded value before return
client.clientConfig.parameters.version = 'v2'
We need this to create temp basket (it's impossible to make in scapi v1)
make first mutation for regular basket using useShopperBasketsMutation('createBasket')
make second mutation for temp basket using same mutation with such code: createBasket.mutate({ parameters: {temporary: true}, body: <<tempBasketBody>> })
place a debugger in src\hooks\ShopperBaskets\cache.ts
updateCustomerBasketsQuery
check that durring second mutation updateCustomerBasketsQuery -> updater returns
only info with already existing basket
Summary
If customer has more than 1 baskets, then on any basket related mutations cache is updated only for first one
Steps To Reproduce #1
add hardcoded value before return
client.clientConfig.parameters.version = 'v2'
We need this to create temp basket (it's impossible to make in scapi v1)
createBasket.mutate({ parameters: {temporary: true}, body: <<tempBasketBody>> })
updateCustomerBasketsQuery
only info with already existing basket
Steps To Reproduce #2 (I haven't tested this one)
updateCustomerBasketsQuery
Expected result
Basket list should consist of all baskets not just old ones
Actual result
Basket list consist of only old(already existing) baskets
System Information (as applicable)
Browser: -
Node version: -
pwa-kit version: 3.8.x
Desktop OS: -
Mobile Device Info: -
The text was updated successfully, but these errors were encountered: