GraphQL collectionUpdate mutation doesn't accept metafields?

Shopify Partner
20 2 5

Hi there!

 

It appears that the collectionUpdate mutation doesn't accept metafields. Is there a reason why? It seems odd, because the productUpdate mutation does accept metafields (along with others like customerUpdate and draftOrderCreate).

 

In the meantime I can use the REST API to update metafields, but it would be great to be able to use the GraphQL API to reduce HTTP requests and keep my code clean.

0 Likes
Shopify Staff
Shopify Staff
298 32 59

Hey Thresher,

 

It definitely should be possible to update metafields via the collectionUpdate mutation, so I'd classify this as a bug.

 

I'm going to let our development team know about the issue and will get back to you on this thread once a fix has been deployed!

 

Thanks for bringing it to our attention, shouldn't be long before you can reduce your HTTP requests and clean up the unwanted REST calls.

1 Like
Shopify Partner
20 2 5

Thank you @Zameer! Much appreciated.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
298 32 59

Hey @Thresher,

 

Just wanted to update you to let you know that this has now been fixed for the API release candidate version for development, and will be included in the upcoming stable version 2019-07 for production. 

 

Let me know if you run into any further issues!

0 Likes
Shopify Partner
20 2 5

Thank you @Zameer !

0 Likes