Hello,
Making a location or locations query results in SOME data being returned, but most of the data is still missing/invalid and I get an unexpected error sometimes as well even with data returned. This results in incomplete data for any other query I make, such as inventory_changes with location in the response. Getting all locations also fails because my client has more than 1 location but only 1 location is returned.
Example 1:
query{ location(id: "OMITTED_FOR_SECURITY") { request_id complexity data { id legacy_id account_id warehouse_id type { id legacy_id account_id name daily_storage_cost } name zone pickable sellable is_cart pick_priority dimensions { weight height width length } temperature last_counted created_at } } }
Response:
{ "errors": [ { "message": "Unexpected Error", "operation": "location", "field": "id", "request_id": "5fbc00572f00adc64adca390", "code": 22 } ], "data": { "location": { "request_id": "5fbc00572f00adc64adca390", "complexity": 1, "data": { "id": null, "legacy_id": 0, "account_id": null, "warehouse_id": null, "type": null, "name": null, "zone": null, "pickable": false, "sellable": false, "is_cart": false, "pick_priority": 0, "dimensions": null, "temperature": null, "last_counted": null, "created_at": null } } } }
Example 2 (inventory_changes, previous_on_hand and change_in_on_hand, along with all of the other data is CORRECT. The location data is incorrect. The location_id is non-null but of course will return the same data as shown below in a location query by location_id:
query { inventory_changes(sku: "OMITTED_FOR_SECURITY") { request_id complexity data (first: 1, sort: "-created_at") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { node { user_id account_id warehouse_id sku previous_on_hand change_in_on_hand reason cycle_counted location_id created_at location { id legacy_id account_id warehouse_id type { id legacy_id account_id name daily_storage_cost } name zone pickable sellable is_cart pick_priority dimensions { weight height width length } temperature last_counted created_at } } cursor } } } }
Response:
{ "errors": [ { "message": "Unexpected Error", "operation": "inventory_changes", "field": "id", "request_id": "5fbc06a852eded689bf525a1", "code": 22 } ], "data": { "inventory_changes": { "request_id": "5fbc06a852eded689bf525a1", "complexity": 2, "data": { "pageInfo": { "hasNextPage": true, "hasPreviousPage": false, "startCursor": "OMITTED_FOR_SECURITY", "endCursor": "OMITTED_FOR_SECURITY" }, "edges": [ { "node": { "user_id": "OMITTED_FOR_SECURITY", "account_id": "OMITTED_FOR_SECURITY", "warehouse_id": "OMITTED_FOR_SECURITY", "sku": "OMITTED_FOR_SECURITY", "previous_on_hand": 6, "change_in_on_hand": -1, "reason": "OMITTED_FOR_SECURITY", "cycle_counted": false, "location_id": "OMITTED_FOR_SECURITY", "created_at": "OMITTED_FOR_SECURITY", "location": { "id": null, "legacy_id": 0, "account_id": null, "warehouse_id": null, "type": null, "name": null, "zone": null, "pickable": false, "sellable": false, "is_cart": false, "pick_priority": 0, "dimensions": null, "temperature": null, "last_counted": null, "created_at": null } }, "cursor": "OMITTED_FOR_SECURITY" } ] } } } }
Example 3 (get all locations):
query { locations { request_id complexity data (first: 5) { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { node { id legacy_id account_id warehouse_id type { id legacy_id account_id name daily_storage_cost } name zone pickable sellable is_cart pick_priority dimensions { weight height width length } temperature last_counted created_at } cursor } } } }
Response (only 1 location, but the client has more than 1 location, and clearly the data looks incomplete):
{ "data": { "locations": { "request_id": "5fbc07eecf4f707bfcb78806", "complexity": 6, "data": { "pageInfo": { "hasNextPage": false, "hasPreviousPage": false, "startCursor": "OMITTED_FOR_SECURITY", "endCursor": "OMITTED_FOR_SECURITY" }, "edges": [ { "node": { "id": "OMITTED_FOR_SECURITY", "legacy_id": OMITTED_FOR_SECURITY, "account_id": "OMITTED_FOR_SECURITY", "warehouse_id": "OMITTED_FOR_SECURITY", "type": null, "name": "Unassigned", "zone": "OMITTED_FOR_SECURITY", "pickable": true, "sellable": true, "is_cart": false, "pick_priority": OMITTED_FOR_SECURITY, "dimensions": { "weight": null, "height": null, "width": null, "length": null }, "temperature": "OMITTED_FOR_SECURITY", "last_counted": null, "created_at": "OMITTED_FOR_SECURITY" }, "cursor": "OMITTED_FOR_SECURITY" } ] } } } }
Please advise.