--- title: parseGid description: |2- Parses [Shopify Global ID (GID)](https://shopify.dev/api/usage/gids) and returns the resource type and ID. api_version: 2025-07 api_name: hydrogen source_url: html: 'https://shopify.dev/docs/api/hydrogen/latest/utilities/parsegid' md: 'https://shopify.dev/docs/api/hydrogen/latest/utilities/parsegid.md' --- # parse​Gid Parses [Shopify Global ID (GID)](https://shopify.dev/api/usage/gids) and returns the resource type and ID. ## parse​Gid([gid](#props-propertydetail-gid)​) ### Parameters * gid string required A shopify GID (string) ### Returns * ShopifyGid ### ShopifyGid * Pick & { id: string; resource: string | null; resourceId: string | null; } ### ShopifyGid ```ts Pick & { id: string; resource: string | null; resourceId: string | null; } ``` ### Examples * #### Example code ##### Description I am the default example ##### JavaScript ```js import {parseGid} from '@shopify/hydrogen'; const {id, resource} = parseGid('gid://shopify/Order/123'); console.log(id); // 123 console.log(resource); // Order ```