Graphql Bulk Operations issue

manuelpette
New Member
1 0 0

I am creating products and some product attributes in bulk using GraphQL Admin API BulkOperations and the creation process works as expected: products and attributes are created correctly. 

Then I do these queries for testing:

  1. I query the products by TAG I get back less products than what I have created
  2. if I check total products count instead it matches the number of the created products.

Looking into the missing products at query 1 I found out that they DO exist and DO have the TAG I am querying for but the query by product tag is not returning expected results, if I query the product by handle it returns the product correctly.

Example of what I am saying: 

{products(first:250,query:"tag:SYSTEM_SKU_DQ0276D000VDQ900") {
  edges {
    node {
      id,
      tags
    }
  }
}}

-----> this returns empty products array

This instead works, and the tag exists:

----- REQ
{
  productByHandle(handle:"D2M49F-ICON-DQ0276D000VDQ900"){
    id,
    tags
  }
}

----- RES
{
  "data": {
    "productByHandle": {
      "id": "gid://shopify/Product/6994715541665",
      "tags": [
        "MODELCODE_DQ0276",
        "REL_D2M49F-ICON-DQ0276D000VDQ214",
        "REL_D2M49F-ICON-DQ0276D000VDQ313",
        "SYSTEM_SKU_DQ0276D000VDQ900"
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 1,
      "actualQueryCost": 1,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 999,
        "restoreRate": 50
      }
    }
  }
}

Can anybody help me out to understand what's happening? Shopify support wouldn't.

Thank you in advance

0 Likes