GraphQL Admin API Get product count, excluding products published to a channel

Solved

GraphQL Admin API Get product count, excluding products published to a channel

lijiahao
Shopify Partner
4 1 1

I use GraphQL Admin API to get the number of products

I use the product statistics api posts_status:approved

But the number of products that do not select channels cannot be excluded

Accepted Solution (1)

lijiahao
Shopify Partner
4 1 1

This is an accepted solution.

I use the GraphQL Admin API 2024-10 version to filter by the publication_ids parameter, which can filter channels. The channel acquisition interface is https://shopify.dev/docs/api/admin-graphql/2024-04/queries/publications

View solution in original post

Replies 2 (2)

vppsonca
Visitor
1 0 0

I have the same issue

lijiahao
Shopify Partner
4 1 1

This is an accepted solution.

I use the GraphQL Admin API 2024-10 version to filter by the publication_ids parameter, which can filter channels. The channel acquisition interface is https://shopify.dev/docs/api/admin-graphql/2024-04/queries/publications