Cannot find Collection legacyResouceId from GraphQL

Highlighted
Tourist
7 0 0

I'm trying to save the legacyResourceId of a collection, but I'm only able to get the graphql Id of it. I need the REST id for my particular need.

Any help is appreciated!

Thanks!

0 Likes
Highlighted
Tourist
7 0 0

Anyone?

0 Likes
Highlighted
Shopify Partner
520 38 109

This does appear to be the case. Although if the mapping holds true then the segment after the final forward slash in the GID would be equivalent (e.g. - gid://shopify/Collection/155122597940). Although this could change down the road sometime, would break the mapping, and you would indeed need to know the true legacyResourceId.

Here's what I got as a response, confirming this field doesn't appear to be accessible using the GQL API.

 

{
  "errors": [
    {
      "message": "Field 'legacyResourceId' doesn't exist on type 'Collection'",
      "locations": [
        {
          "line": 5,
          "column": 5
        }
      ],
      "path": [
        "query",
        "collection",
        "legacyResourceId"
      ],
      "extensions": {
        "code": "undefinedField",
        "typeName": "Collection",
        "fieldName": "legacyResourceId"
      }
    }
  ]
}

 

Can a Shopify rep please speak to this?

1 Like