【问题标题】:Graphql in Shopify: getting order with "order_name" instead of idShopify 中的 Graphql:使用“order_name”而不是 id 获取订单
【发布时间】:2020-04-06 13:54:11
【问题描述】:

假设我在 Shopify 中有一个查询,我想在其中检索订单,但不是通过 id,而是通过 order_name。使用其余的 API,这是完全可能的。我如何在 graphql 中做到这一点?

Shopify 的请求如下所示:

    {
       order(id: "") {
         closed
       }
    }

【问题讨论】:

  • GraphQL 无法检索订单。而且由于订单名称不在订单查询中的可过滤参数中,因此无法过滤带有订单名称的订单。

标签: graphql shopify


【解决方案1】:

这可以通过查询:“order_name”来完成,但不确定shopify如何对字段进行优先级排序,所以要小心

【讨论】:

    猜你喜欢
    • 2018-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-01
    相关资源
    最近更新 更多