Hi,
I’m trying to use the GraphQL API to get a set of items by SKU in a single request. As far as I can tell from the GraphQL docs, this should be possible via aliases. However, aliases as described on that page don’t seem to work with Shiphero. Instead, I get an errors
array that spits back the aliases as the messages, and all of the products returned are duplicates of the one I specified last. It also doesn’t seem to give any complexity data for such requests.
For example:
Request ID: 5f19dda494e5a7f7ec460ec9
Query:
query {
one: product(sku: "100") {
request_id
complexity
data {
sku
name
barcode
}
}
two: product(sku: "110") {
request_id
complexity
data {
sku
name
barcode
}
}
}
Response:
{
"errors": [
{
"message": "'one'"
},
{
"message": "'two'"
}
],
"data": {
"one": {
"request_id": "5f19dda494e5a7f7ec460ec9",
"complexity": null,
"data": {
"sku": "110",
"name": "Example product name",
"barcode": "110-001"
}
},
"two": {
"request_id": "5f19dda494e5a7f7ec460ec9",
"complexity": null,
"data": {
"sku": "110",
"name": "Example product name",
"barcode": "110-001"
}
}
}
}
Are aliases simply not supported? If not, is there any way to get a subset of items by SKU other than individually requesting each one?