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,23 +11315,15 @@ export type VariantDeleteMutationResult = Apollo.MutationResult<Types.VariantDel
|
||||||
export type VariantDeleteMutationOptions = Apollo.BaseMutationOptions<Types.VariantDeleteMutation, Types.VariantDeleteMutationVariables>;
|
export type VariantDeleteMutationOptions = Apollo.BaseMutationOptions<Types.VariantDeleteMutation, Types.VariantDeleteMutationVariables>;
|
||||||
export const VariantUpdateDocument = gql`
|
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) {
|
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(
|
productVariantStocksDelete(warehouseIds: $removeStocks, variantId: $id) {
|
||||||
id: $id
|
|
||||||
input: {attributes: $attributes, sku: $sku, trackInventory: $trackInventory, preorder: $preorder, weight: $weight, quantityLimitPerCustomer: $quantityLimitPerCustomer}
|
|
||||||
) {
|
|
||||||
errors {
|
errors {
|
||||||
...ProductErrorWithAttributes
|
...ProductVariantStocksDeleteError
|
||||||
}
|
}
|
||||||
productVariant {
|
productVariant {
|
||||||
...ProductVariant
|
id
|
||||||
}
|
stocks {
|
||||||
}
|
...Stock
|
||||||
productVariantStocksUpdate(stocks: $stocks, variantId: $id) {
|
}
|
||||||
errors {
|
|
||||||
...BulkStockError
|
|
||||||
}
|
|
||||||
productVariant {
|
|
||||||
...ProductVariant
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
productVariantStocksCreate(stocks: $addStocks, variantId: $id) {
|
productVariantStocksCreate(stocks: $addStocks, variantId: $id) {
|
||||||
|
@ -11345,23 +11337,31 @@ export const VariantUpdateDocument = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
productVariantStocksDelete(warehouseIds: $removeStocks, variantId: $id) {
|
productVariantStocksUpdate(stocks: $stocks, variantId: $id) {
|
||||||
errors {
|
errors {
|
||||||
...ProductVariantStocksDeleteError
|
...BulkStockError
|
||||||
}
|
}
|
||||||
productVariant {
|
productVariant {
|
||||||
id
|
...ProductVariant
|
||||||
stocks {
|
}
|
||||||
...Stock
|
}
|
||||||
}
|
productVariantUpdate(
|
||||||
|
id: $id
|
||||||
|
input: {attributes: $attributes, sku: $sku, trackInventory: $trackInventory, preorder: $preorder, weight: $weight, quantityLimitPerCustomer: $quantityLimitPerCustomer}
|
||||||
|
) {
|
||||||
|
errors {
|
||||||
|
...ProductErrorWithAttributes
|
||||||
|
}
|
||||||
|
productVariant {
|
||||||
|
...ProductVariant
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${ProductErrorWithAttributesFragmentDoc}
|
${ProductVariantStocksDeleteErrorFragmentDoc}
|
||||||
${ProductVariantFragmentDoc}
|
|
||||||
${BulkStockErrorFragmentDoc}
|
|
||||||
${StockFragmentDoc}
|
${StockFragmentDoc}
|
||||||
${ProductVariantStocksDeleteErrorFragmentDoc}`;
|
${BulkStockErrorFragmentDoc}
|
||||||
|
${ProductVariantFragmentDoc}
|
||||||
|
${ProductErrorWithAttributesFragmentDoc}`;
|
||||||
export type VariantUpdateMutationFn = Apollo.MutationFunction<Types.VariantUpdateMutation, Types.VariantUpdateMutationVariables>;
|
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
|
$lastValues: Int
|
||||||
$beforeValues: String
|
$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(
|
productVariantUpdate(
|
||||||
id: $id
|
id: $id
|
||||||
input: {
|
input: {
|
||||||
|
@ -228,36 +258,6 @@ export const variantUpdateMutation = gql`
|
||||||
...ProductVariant
|
...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