I’m trying to query an array of order ids. The query works when I run it in the GraphiQL app:
{
nodes(ids: ["gid://shopify/Order/4970801299682", "gid://shopify/Order/4970801135842"]) {
... on Order {
shippingAddress {
firstName
lastName
address1
city
country
}
}
}
}
However, when I run the query from my admin I get an array with the correct number of items, but each entry is null.
const ORDERS_QUERY = `
query nodes($ids: [ID!]!) {
nodes(ids: $ids) {
...on Order {
shippingAddress{firstName, lastName, address1, city, country}
}
}
}`
const orders = await client.query({
data: {
query: ORDERS_QUERY,
variables: {
ids: [ "gid://shopify/Order/4970801299682", "gid://shopify/Order/4970801135842" ]
}
}
});
Results:
My question is, why am I receiving null array values? (I’ve tested retrieving a list of discount codes - which is working as expected).

