How to manage disconnect between numberic IDs and GraphQL IDs

2 0 0


I'm working a Shopify app and I've using the GraphQL Admin API and I'm trying to understand why some resources use the GraphQL ID and others don't, and how I'm supposed to get around that problem?

When I create an "App Extension" link that goes from the product page to my app, the query string it appends is just a numeric ID, not the GraphQL ID. I can build up the GraphQL ID from this but the documentation says you're not supposed to do that because they might not be the same but gives no explanation on what to do instead.

Also because other parts of the admin, specifically the ResourcePicker, return the GraphQL ID and not the product ID that means that when I need to use that on the frontend of the website, I can't use it with the JS API. For example, trying to add a product to the card takes the numeric ID and not the GraphQL ID?

It seems like only some things have been updated to use GraphQL and others haven't so there's some disconnect between these options unless I'm missing something?


Replies 2 (2)

1 0 0

If someone will be looking at the same issue, please check this reply to the similar question:

Shopify Partner
58 5 8

This still seems unsolved and I have same problem.  I guess I'm just going to manually construct the gid and hope they don't change the API.