I’m trying to get some collections gid’s using GraphQL. Everything works good when I’m trying to get them using GraphQL app. But when I’m trying to get them using my private app - I receive storefrontId instead of gid.
Here’s my query:
{
collections(first: 200, query: "title:Bebe OR title:Enfant") {
edges {
node {
id
}
}
}
}
The results you’re seeing appear to be from the storefront API. Can you confirm that you’re using basic auth and making your calls to https://{{store_name}}.myshopify.com/admin/api/{{version}}/graphql.jsonin Postman?
The admin graphQL API uses basic auth + the admin link above to communicate with Shopify. In you’re using an access token and missingadmin in the URL, that means you’re making calls to the storefront API and you’ll want to switch to the admin API to get the expected collection_ids.
If you already are using the admin API and still getting unexpected results, please provide the api_client_id of your app or the x-shopify-request-id from the response headers in Postman, and we can investigate further.