Currently, if there is no item in the cart, the query FetchCartItems is executed with an empty filter that returns ALL the offer of the platform which takes a very long time.
{
"operationName": "FetchCartItems",
"variables": {
"offerIds": []
},
"query": "query FetchCartItems($offerIds: [UUID!]!) {\n listings(condition: {ids: $offerIds, status: [ACTIVE, EXPIRED]}) {\n nodes {\n id\n type\n expiredAt\n maker {\n address\n name\n image\n verification {\n status\n __typename\n }\n __typename\n }\n unitPrice\n availableQuantity\n currency {\n image\n id\n decimals\n symbol\n __typename\n }\n asset {\n chainId\n collectionAddress\n tokenId\n collection {\n chainId\n address\n name\n standard\n __typename\n }\n name\n image\n imageMimetype\n animationUrl\n animationMimetype\n __typename\n }\n __typename\n }\n __typename\n }\n}"
}
The query should not be executed if the offerIds is an empty array.
Currently, if there is no item in the cart, the query
FetchCartItemsis executed with an empty filter that returns ALL the offer of the platform which takes a very long time.{ "operationName": "FetchCartItems", "variables": { "offerIds": [] }, "query": "query FetchCartItems($offerIds: [UUID!]!) {\n listings(condition: {ids: $offerIds, status: [ACTIVE, EXPIRED]}) {\n nodes {\n id\n type\n expiredAt\n maker {\n address\n name\n image\n verification {\n status\n __typename\n }\n __typename\n }\n unitPrice\n availableQuantity\n currency {\n image\n id\n decimals\n symbol\n __typename\n }\n asset {\n chainId\n collectionAddress\n tokenId\n collection {\n chainId\n address\n name\n standard\n __typename\n }\n name\n image\n imageMimetype\n animationUrl\n animationMimetype\n __typename\n }\n __typename\n }\n __typename\n }\n}" }The query should not be executed if the
offerIdsis an empty array.