GraphQL collectionUpdate mutation doesn't accept metafields?

Thresher
Shopify Partner
20 2 24

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.

Replies 4 (4)

Zameer
Shopify Staff
297 31 90

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.

To learn more visit the Shopify Help Center or the Community Blog.

Thresher
Shopify Partner
20 2 24

Thank you @Zameer! Much appreciated.

Zameer
Shopify Staff
297 31 90

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!

To learn more visit the Shopify Help Center or the Community Blog.

Thresher
Shopify Partner
20 2 24

Thank you @Zameer !