Refactor Collection Reorder Mutation for Incremental Moves

8/19/2025, 3:25:48 PM

The collectionReorderProducts mutation’s description and arguments were rewritten to clarify that only moved products should be sent, that moves are applied sequentially, and that newPosition is a zero‑based index evaluated after each prior move; the mutation now returns a job object. The moves list’s documentation was updated to emphasize sending only changed products, allowing non‑unique newPosition values and moving items to the end if the value exceeds the list length. The mutation’s return type remains CollectionReorderProductsPayload. Additional schema changes include converting CheckoutAndAccountsAppConfiguration.brandingConfiguration from a raw JSON scalar to a typed CheckoutBranding object, removing the resourceType field from CustomerPaymentMethod, and adding several new enum values for various error codes (TAG_EXCEEDS_MAX_LENGTH, ACTIVATION_FAILED, etc.). A new field disputeEvidence was added to ShopifyPaymentsDispute to expose dispute evidence details, and a set of LENDING‑related transaction types was added to ShopifyPaymentsTransactionType. The enum StagedUploadTargetGenerateUploadResource now includes DISPUTE_FILE_UPLOAD. Finally, the entire MandateResourceType enum was removed from the schema. Developers must adjust mutation payloads for collection reordering, update type handling for the new branding object, and account for the removed field and added enums in error handling and transaction logic.

Mutation Changes

🔄 Modified Mutations (1)

collectionReorderProducts

Asynchronously reorders products within a specified collection. Instead of returning an updated collection, this mutation returns a job, which should be polled. The Collection.sortOrder must be MANUAL.

How to use this mutation:

  • Provide only the products that actually moved in the moves list; do not send the entire product list. For example: to move the product at index 1 to index N, send a single move for that product with newPosition: N.
  • Each move is applied sequentially in the order provided.
  • newPosition is a zero-based index within the collection at the moment the move is applied (after any prior moves in the list).
  • Products not included in moves keep their relative order, aside from any displacement caused by the moves.
  • If newPosition is greater than or equal to the number of products, the product is placed at the end.

Example:

  • Initial order: [A, B, C, D, E] (indices 0..4)
  • Moves (applied in order):
    • E -> newPosition: 1
    • C -> newPosition: 4
  • Result: [A, E, B, D, C]

Displaced products will have their position altered in a consistent manner with no gaps.

~ Modified argument: moves

Type Changes

➖ Removed Types (1)

📋MandateResourceType➖ RemovedENUM

The type of resource a payment mandate can be used for.

Values: CARD_ON_FILE, CHECKOUT, DRAFT_ORDER, ORDER, SUBSCRIPTIONS

🔄 Modified Types (12)

🏗️CheckoutAndAccountsAppConfiguration🔄 Modified
🔄 Field modified: brandingConfiguration
🏗️CustomerPaymentMethod🔄 Modified
➖ Field removed: resourceType
🏗️InventoryShipmentMarkInTransitUserErrorCode🔄 Modified
➕ Enum value added: ACTIVATION_FAILED
🏗️InventoryTransferCreateAsReadyToShipUserErrorCode🔄 Modified
➕ Enum value added: TAG_EXCEEDS_MAX_LENGTH
🏗️InventoryTransferCreateUserErrorCode🔄 Modified
➕ Enum value added: TAG_EXCEEDS_MAX_LENGTH
🏗️InventoryTransferEditUserErrorCode🔄 Modified
➕ Enum value added: TAG_EXCEEDS_MAX_LENGTH
🏗️MarketUserErrorCode🔄 Modified
➕ Enum value added: INVALID_COUNTRY_AND_PROVINCE_DRIVERS
➕ Enum value added: PROVINCE_MUST_BELONG_TO_COUNTRY
➕ Enum value added: CANNOT_ADD_ALL_PROVINCES_FOR_A_COUNTRY_TO_A_MARKET
➕ Enum value added: INVALID_RESPONDER_FOR_PROVINCE_DRIVEN_MARKET
🏗️ProductVariantsBulkCreateStrategy🔄 Modified
➕ Enum value added: PRESERVE_STANDALONE_VARIANT
🏗️SearchResult🔄 Modified
🔄 Field modified: reference
🏗️ShopifyPaymentsDispute🔄 Modified
➕ Field added: disputeEvidence

The evidence associated with the dispute.

🏗️ShopifyPaymentsTransactionType🔄 Modified
➕ Enum value added: LENDING_DEBIT
➕ Enum value added: LENDING_DEBIT_REVERSAL
➕ Enum value added: LENDING_CREDIT
➕ Enum value added: LENDING_CREDIT_REVERSAL
➕ Enum value added: LENDING_CAPITAL_REMITTANCE
➕ Enum value added: LENDING_CAPITAL_REMITTANCE_REVERSAL
➕ Enum value added: LENDING_CREDIT_REMITTANCE
➕ Enum value added: LENDING_CREDIT_REMITTANCE_REVERSAL
➕ Enum value added: LENDING_CAPITAL_REFUND
➕ Enum value added: LENDING_CAPITAL_REFUND_REVERSAL
➕ Enum value added: LENDING_CREDIT_REFUND
➕ Enum value added: LENDING_CREDIT_REFUND_REVERSAL
🏗️StagedUploadTargetGenerateUploadResource🔄 Modified
➕ Enum value added: DISPUTE_FILE_UPLOAD