Collection Reorder Products User Error
An error that happens when can't reorder the products of a collection.
Anchor to FieldsFields
- code (CollectionReorderProductsUserErrorCode)
- field ([String!])
- message (String!)
- Anchor to codecode•Collection
Reorder Products User Error Code The error code.
Show enum values
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Anchor to MutationsMutations
- collectionReorderProducts (CollectionReorderProductsPayload)
- •mutation
Asynchronously reorders the products of a manually sorted collection. Instead of returning an updated collection, this mutation returns a job, which should be polled. The
must beMANUAL.Positions are zero-based indexes in the collection's list of products. Products that the request doesn't list keep their relative order, and the reorder leaves no gaps. The description of each argument that reorders products says how it places them.
Show payload
- •ID!required
The ID of the collection on which to reorder products.
- Anchor to movesmoves•[Move
Input!] A list of moves to perform, applied one at a time in the order given. Provide only the products that move; don't send the whole list.
is a zero-based index in the list as it is when the move applies, after all earlier moves in the list.values don't need to be unique. A value greater than or equal to the number of products moves the product to the end.- Products that aren't in
moveskeep their relative order, aside from the displacement that the moves cause.
Example:
- Initial order: [A, B, C, D, E] (indexes 0 to 4)
- Moves, applied in order: E to
, then C to - Result: [A, E, B, D, C]
Up to 250 moves are supported.
Send either
movesoroperation, not both.Show input fields
- Anchor to operationoperation•Collection
Reorder Operation Input A declarative reorder that gives the place where products end up. Use
to move a block of products to the top, to the bottom or to an index, orto give products their final indexes. Send eithermovesoroperation, not both.Up to 1,000 products are supported. To reorder more products, send successive
requests at indexes 0, 1,000, 2,000 and so on, each one after the job of the request before it is done.Show input fields
Arguments
- •ID!