Fix flickering warehouse list in variant details (#2009)
* Fix merge functionin cached stocks * Revert "Fix merge functionin cached stocks" This reverts commit caf4956fde78abe33e893ed8b095f6275f73ef37. * Change mutation order
This commit is contained in:
parent
8fee2ccd4b
commit
2d71c138b7
3 changed files with 55 additions and 55 deletions
|
@ -11315,24 +11315,16 @@ export type VariantDeleteMutationResult = Apollo.MutationResult<Types.VariantDel
|
|||
export type VariantDeleteMutationOptions = Apollo.BaseMutationOptions<Types.VariantDeleteMutation, Types.VariantDeleteMutationVariables>;
|
||||
export const VariantUpdateDocument = gql`
|
||||
mutation VariantUpdate($addStocks: [StockInput!]!, $removeStocks: [ID!]!, $id: ID!, $attributes: [AttributeValueInput!], $sku: String, $quantityLimitPerCustomer: Int, $trackInventory: Boolean!, $stocks: [StockInput!]!, $preorder: PreorderSettingsInput, $weight: WeightScalar, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) {
|
||||
productVariantUpdate(
|
||||
id: $id
|
||||
input: {attributes: $attributes, sku: $sku, trackInventory: $trackInventory, preorder: $preorder, weight: $weight, quantityLimitPerCustomer: $quantityLimitPerCustomer}
|
||||
) {
|
||||
productVariantStocksDelete(warehouseIds: $removeStocks, variantId: $id) {
|
||||
errors {
|
||||
...ProductErrorWithAttributes
|
||||
...ProductVariantStocksDeleteError
|
||||
}
|
||||
productVariant {
|
||||
...ProductVariant
|
||||
id
|
||||
stocks {
|
||||
...Stock
|
||||
}
|
||||
}
|
||||
productVariantStocksUpdate(stocks: $stocks, variantId: $id) {
|
||||
errors {
|
||||
...BulkStockError
|
||||
}
|
||||
productVariant {
|
||||
...ProductVariant
|
||||
}
|
||||
}
|
||||
productVariantStocksCreate(stocks: $addStocks, variantId: $id) {
|
||||
errors {
|
||||
|
@ -11345,23 +11337,31 @@ export const VariantUpdateDocument = gql`
|
|||
}
|
||||
}
|
||||
}
|
||||
productVariantStocksDelete(warehouseIds: $removeStocks, variantId: $id) {
|
||||
productVariantStocksUpdate(stocks: $stocks, variantId: $id) {
|
||||
errors {
|
||||
...ProductVariantStocksDeleteError
|
||||
...BulkStockError
|
||||
}
|
||||
productVariant {
|
||||
id
|
||||
stocks {
|
||||
...Stock
|
||||
...ProductVariant
|
||||
}
|
||||
}
|
||||
productVariantUpdate(
|
||||
id: $id
|
||||
input: {attributes: $attributes, sku: $sku, trackInventory: $trackInventory, preorder: $preorder, weight: $weight, quantityLimitPerCustomer: $quantityLimitPerCustomer}
|
||||
) {
|
||||
errors {
|
||||
...ProductErrorWithAttributes
|
||||
}
|
||||
productVariant {
|
||||
...ProductVariant
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${ProductErrorWithAttributesFragmentDoc}
|
||||
${ProductVariantFragmentDoc}
|
||||
${BulkStockErrorFragmentDoc}
|
||||
${ProductVariantStocksDeleteErrorFragmentDoc}
|
||||
${StockFragmentDoc}
|
||||
${ProductVariantStocksDeleteErrorFragmentDoc}`;
|
||||
${BulkStockErrorFragmentDoc}
|
||||
${ProductVariantFragmentDoc}
|
||||
${ProductErrorWithAttributesFragmentDoc}`;
|
||||
export type VariantUpdateMutationFn = Apollo.MutationFunction<Types.VariantUpdateMutation, Types.VariantUpdateMutationVariables>;
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -210,6 +210,36 @@ export const variantUpdateMutation = gql`
|
|||
$lastValues: Int
|
||||
$beforeValues: String
|
||||
) {
|
||||
productVariantStocksDelete(warehouseIds: $removeStocks, variantId: $id) {
|
||||
errors {
|
||||
...ProductVariantStocksDeleteError
|
||||
}
|
||||
productVariant {
|
||||
id
|
||||
stocks {
|
||||
...Stock
|
||||
}
|
||||
}
|
||||
}
|
||||
productVariantStocksCreate(stocks: $addStocks, variantId: $id) {
|
||||
errors {
|
||||
...BulkStockError
|
||||
}
|
||||
productVariant {
|
||||
id
|
||||
stocks {
|
||||
...Stock
|
||||
}
|
||||
}
|
||||
}
|
||||
productVariantStocksUpdate(stocks: $stocks, variantId: $id) {
|
||||
errors {
|
||||
...BulkStockError
|
||||
}
|
||||
productVariant {
|
||||
...ProductVariant
|
||||
}
|
||||
}
|
||||
productVariantUpdate(
|
||||
id: $id
|
||||
input: {
|
||||
|
@ -228,36 +258,6 @@ export const variantUpdateMutation = gql`
|
|||
...ProductVariant
|
||||
}
|
||||
}
|
||||
productVariantStocksUpdate(stocks: $stocks, variantId: $id) {
|
||||
errors {
|
||||
...BulkStockError
|
||||
}
|
||||
productVariant {
|
||||
...ProductVariant
|
||||
}
|
||||
}
|
||||
productVariantStocksCreate(stocks: $addStocks, variantId: $id) {
|
||||
errors {
|
||||
...BulkStockError
|
||||
}
|
||||
productVariant {
|
||||
id
|
||||
stocks {
|
||||
...Stock
|
||||
}
|
||||
}
|
||||
}
|
||||
productVariantStocksDelete(warehouseIds: $removeStocks, variantId: $id) {
|
||||
errors {
|
||||
...ProductVariantStocksDeleteError
|
||||
}
|
||||
productVariant {
|
||||
id
|
||||
stocks {
|
||||
...Stock
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
|
Loading…
Reference in a new issue