How to manage disconnect between numberic IDs and GraphQL IDs

Highlighted
New Member
2 0 0

Hi,

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?

Thanks,

0 Likes