Shopify Community AMA with Shopify Developers: The New GraphQL Product APIs

Hi @abhiroop
Files uploaded to shopify (for example, with fileCreate) can be associated to many products simply using the file_id being returned. Querying for the file and using its ID will work (even if it’s the product media ID)

:waving_hand: Hi @windmillcode ,

I just double-checked the docs, and it doesn’t look like subscription_contracts is something which is supported by the products query in 2024-04.

https://shopify.dev/docs/api/admin-graphql/2024-04/queries/products#argument-query

You can query variantsCount on a product like this:

query variantsCount {

product(id: “gid://shopify/Product/1”){

id

variants(first: 10) {

nodes {

id

title

}

}

variantsCount(query: “title:Nylon*”) {

count

precision

}

}

}

Hi @Shailesh_Aten ,

Thanks for raising this. Agree we don’t provide this currently in a simple way, will take this into account for future API versions.
Could you clarify what you mean by “Size header”?

We currently support a productFeed for channel apps. Additionally any app can subscribe to the products webhooks to get notifications for changes to any product. Could you tell us more about your usecase and why this doesnt solve for it?

We changed the latest API version 2024-07 to make productSet run synchronously by default. There is no longer the limitation of 100 variants when run synchronously.

Cheers

  1. @AsafGitai thanks but still a bit unclear. Does the array you highlighted include only variants that have changed? Or does it always include all variants? We’d still prefer you would add new topics for variants… It’s strange to introduce a completely new pattern when there is already a clear and simple pattern for all other webhooks.

  2. Could you please also respond to my other question above regarding variant metafield not triggering a webhook?

@AsafGitai could you answer, please?

we have updated the documentation to make it a bit clearer

@JustinKillian I requested a backfill of read/write_publications and Shopify is considering it

See their reply in latest AMA

@JustinKillian Shopify has given an option to backfill read/write_publications. You need to support these scopes in code and fill out a form

See latest AMA reply: https://community.shopify.com/post/2817779