GraphQL Admin API问题:弃购结账shippingAddress字段返回Null
Shopify GraphQL Admin API查询弃购结账时shippingAddress返回Null问题
我通过Shopify合作伙伴后台在开发店铺安装了一款尚未上架的公开应用,调用GraphQL Admin API查询弃购结账时,遇到shippingAddress字段返回Null的问题,其他如billingAddress、customer、lineItems等字段均正常返回。
使用的查询语句
export const GET_ABANDONED_CHECKOUTS_QUERY = ` query ($first: Int!, $query: String!) { abandonedCheckouts(first: $first, query: $query) { edges { node { id createdAt email recoveryUrl customer { firstName lastName email } billingAddress { address1 city country } shippingAddress { address1 city country } lineItems(first: 10) { edges { node { title quantity variant { id price } } } } } } } } `;
响应说明
返回结果中,客户的默认地址信息正常返回(如下所示),但shippingAddress字段始终为Null:
"default_address": { "id": 9501xxx, "customer_id": 812xxx, "first_name": "MxxxT", "last_name": "ExxxxN", "company": null, "address1": "TEST", "address2": null, "city": "AxxxA", "province": null, "country": "Txxxy", "zip": null, "phone": null, "name": "Mxxxxxx xxxxN", "province_code": null, "country_code": "TR", "country_name": "Txxxy", "default": true }
设置详情
- API版本:2025-01
- 权限范围:
- read_checkouts
- read_orders
- read_customers
- write_checkouts
- write_orders
- write_products
- 环境:应用通过Shopify合作伙伴后台安装,API请求已认证,针对开发店铺
问题前提条件
以下条件均已满足,但shippingAddress仍返回Null:
- 该弃购结账在Shopify后台「订单」>「弃购结账」中可见;
- 结账流程已填写有效的配送地址;
- 店铺主要销售需要配送的实体商品;
- API令牌具备
read_orders、read_checkouts等必要权限。
已完成的排查操作
- 确认弃购结账记录在Shopify后台存在;
- 检查应用安装及API请求认证无误;
- 确认弃购前已完成配送地址填写;
- 尝试不带过滤器(
query: "")查询所有弃购结账; - 验证billingAddress正常填充,但shippingAddress仍为Null。
请问这是预期行为还是API Bug?有没有人遇到过类似问题,恳请指导。
内容的提问来源于stack exchange,提问作者Murat ERDOGAN
相关产品推荐
相关产品推荐

