stockBulkUpdate Mutation
Updates stocks for a given variant and warehouse. Variant and warehouse selectors have to be the same for all stock inputs. Is not allowed to use ‘variantId’ in one input and ‘variantExternalReference’ in another.
Triggers the following webhook events:
- PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock details were updated.
Applied directives
@webhookEventsInfo(asyncEvents: [PRODUCT_VARIANT_STOCK_UPDATED], syncEvents: [])
stockBulkUpdate(errorPolicy: ErrorPolicyEnum, stocks: [StockBulkUpdateInput!]!): StockBulkUpdate
Returns
Show return type
type StockBulkUpdate {
count: Int!
results: [StockBulkResult!]!
errors: [StockBulkUpdateError!]!
}Arguments
errorPolicy
errorPolicy · ErrorPolicyEnum
Policies of error handling. DEFAULT: REJECT_EVERYTHING
stocks
stocks · [StockBulkUpdateInput!]!
Input list of stocks to update.
Schema: Saleor 3.23.43. Download SDL.