Are the GraphQL API doc regarding updating/creating collections outdated?

brydom
Visitor
1 0 0

I believe the API docs are out of date for updating on collection creation and creating on collection update.

 

On collectionCreate under `id` it states:

Specifies the collection to update or create a new collection if absent.

 

With this input:

  input: {
    title: 'Special Snares',
    descriptionHtml: 'Test',
    id: 'gid://shopify/Collection/299687116949'
  }

I receive this response:

"userErrors":[{"field":["id"],"message":"id cannot be specified on collection creation","__typename":"UserError"}]

 

And on the other end, with `collectionUpdate`, it states:

Specifies the collection to update or create a new collection if absent.

And I receive this response with an `id` attached:

id must be specified on collectionUpdate

 

Reply 1 (1)

kevnob
Shopify Staff
11 3 3

Hi @brydom,

 

Thanks for your post and for sharing your findings! 

 

I tested this on my end as well with the same results and I have sent this to our developer documents team to clarify / enhance. 

 

Thanks again for taking the time to report it. 

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