Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Endpoint (REST/GraphQL) for add more products to a custom collection

Endpoint (REST/GraphQL) for add more products to a custom collection

yuriih1
Shopify Partner
3 0 0

I can't find any endpoint / gql stuff to add more products to an existing custom collection. I can't use collectionUpdate since it throws error when I tried to add products variable to the gql schema, saying products variable can't be there when updating a collection. I've failed when using the REST API either. This is because we'll hit by "Input max size of 250" error when we try to create a new collection with 250+ products. how do I go around this?

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 527

Hey @yuriih1

 

The collectionAddProductsV2 mutation should work well for this! 

 

Hope that helps! 

 

- Kyle G.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog