Hi, I was debugging an issue from our business where an inventory sync had failed from shiphero to our ERP. After investigating i found it was due to a duplicate material. This duplicate material snuck in even with using the endCursor. See below the 4th and 5th(final) query that held this duplicate item. (i have removed most of the payload here to not dump too much but I assume you can figure this out with the request ids what went wrong)
4th Query
query Warehouse_products { warehouse_products(warehouse_id: “<warehouse_id>”) { request_id complexity data(after: “YXJyYXljb25uZWN0aW9uOjI5OQ==”) { edges { node { sku on_hand } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } } }
Result
{“data”:{“warehouse_products”:{“request_id”:“67c19e0ae654c9f672d27b20”,“complexity”:101,“data”:{“edges”:[…{“node”:{“sku”:“en-qt-mnt-03”,“on_hand”:414}}…],“pageInfo”:{“hasNextPage”:true,“hasPreviousPage”:true,“startCursor”:“YXJyYXljb25uZWN0aW9uOjMwMA==”,“endCursor”:“YXJyYXljb25uZWN0aW9uOjM5OQ==”}}}},“extensions”:{“throttling”:{“estimated_complexity”:101,“cost”:101,“cost_detail”:{“warehouse_products”:{“items_count”:100,“cost”:1,“total_cost”:101,“fields”:{}}},“user_quota”:{“credits_remaining”:1901,“max_available”:2002,“increment_rate”:30}}}}
Last Query
query Warehouse_products { warehouse_products(warehouse_id: “<warehouse_id>”) { request_id complexity data(after: “YXJyYXljb25uZWN0aW9uOjM5OQ==”) { edges { node { sku on_hand } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } } }
Result
{“data”:{“warehouse_products”:{“request_id”:“67c19e171b87d4c8ee147587”,“complexity”:101,“data”:{“edges”:[…{“node”:{“sku”:“en-qt-mnt-03”,“on_hand”:414}}],“pageInfo”:{“hasNextPage”:false,“hasPreviousPage”:true,“startCursor”:“YXJyYXljb25uZWN0aW9uOjQwMA==”,“endCursor”:“YXJyYXljb25uZWN0aW9uOjQwMg==”}}}},“extensions”:{“throttling”:{“estimated_complexity”:101,“cost”:4,“cost_detail”:{“warehouse_products”:{“items_count”:3,“cost”:1,“total_cost”:4,“fields”:{}}},“user_quota”:{“credits_remaining”:1998,“max_available”:2002,“increment_rate”:30}}}}