简体   繁体   English

从 shopify GraphQL 获取超过 10000 种产品的产品数据

[英]Get Product Data from shopify GraphQL for over 10000 Products

I have an extremely large selection of products in a collection (140,000), to get the data of 250 is fine but I need to get a list of tags for 140,000 products, I have created a bulkOperationRunQuery to get the data.我在一个集合中有非常多的产品选择(140,000),获取 250 的数据很好,但我需要获取 140,000 产品的标签列表,我创建了一个 bulkOperationRunQuery 来获取数据。 Here is the query I use to run这是我用来运行的查询

mutation {
 bulkOperationRunQuery(
  query: """
  {
   products{
    edges{
      node{
        id
        tags
      }
    }
  }
}
   """
 ) {
bulkOperation {
  id
  status
}
userErrors {
  field
  message
}
}}

This Works but takes far to long to process, how can I make this quicker is there a set limit on the request这有效,但需要很长时间才能处理,我怎样才能更快地处理请求是否有设置限制

That is all you get for a massive ask like that.这就是你得到这样一个巨大的要求的全部。 If you have 140,000 products you ask for the once.如果您有 140,000 种产品,您只需要一次。 Then you have them, and speed should be of little consequence.然后你就有了它们,速度应该无关紧要。 There is no need to repeat yourself by asking for them again and again.没有必要通过一次又一次地要求他们来重复自己。 If you are interested in changes, just listen to product change webhooks.如果您对更改感兴趣,只需收听产品更改 webhook。 Save yourself a lot of grief that way.这样可以为自己省去很多悲伤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM