Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Refresh cache after mutations

dominik-zeglenf771503b87c1
diff --git a/saleor/static/dashboard-next/productTypes/mutations.ts b/saleor/static/dashboard-next/productTypes/mutations.ts
index e1641c0a63..ae507193de 100644
--- a/saleor/static/dashboard-next/productTypes/mutations.ts
+++ b/saleor/static/dashboard-next/productTypes/mutations.ts
@@ -84,6 +84,7 @@ export const TypedProductTypeCreateMutation = TypedMutation<
>(productTypeCreateMutation);
export const attributeCreateMutation = gql`
+ ${productTypeDetailsFragment}
mutation AttributeCreate(
$id: ID!
$input: AttributeCreateInput!
@@ -94,6 +95,9 @@ export const attributeCreateMutation = gql`
field
message
}
+ productType {
+ ...ProductTypeDetailsFragment
+ }
}
}
`;
@@ -122,12 +126,16 @@ export const TypedAttributeUpdateMutation = TypedMutation<
>(attributeUpdateMutation);
export const attributeDeleteMutation = gql`
+ ${productTypeDetailsFragment}
mutation AttributeDelete($id: ID!) {
attributeDelete(id: $id) {
errors {
field
message
}
+ productType {
+ ...ProductTypeDetailsFragment
+ }
}
}
`;
diff --git a/saleor/static/dashboard-next/productTypes/types/AttributeCreate.ts b/saleor/static/dashboard-next/productTypes/types/AttributeCreate.ts
index 48a2b83f70..eeaf66b914 100644
--- a/saleor/static/dashboard-next/productTypes/types/AttributeCreate.ts
+++ b/saleor/static/dashboard-next/productTypes/types/AttributeCreate.ts
@@ -1,7 +1,7 @@
/* tslint:disable */
// This file was automatically generated and should not be edited.
-import { AttributeCreateInput, AttributeTypeEnum } from "./../../types/globalTypes";
+import { AttributeCreateInput, AttributeTypeEnum, TaxRateType } from "./../../types/globalTypes";
// ====================================================
// GraphQL mutation operation: AttributeCreate
@@ -13,9 +13,58 @@ export interface AttributeCreate_attributeCreate_errors {
message: string | null;
}
+export interface AttributeCreate_attributeCreate_productType_productAttributes_values {
+ __typename: "AttributeValue";
+ id: string;
+ name: string | null;
+ slug: string | null;
+}
+
+export interface AttributeCreate_attributeCreate_productType_productAttributes {
+ __typename: "Attribute";
+ id: string;
+ name: string | null;
+ slug: string | null;
+ values: (AttributeCreate_attributeCreate_productType_productAttributes_values | null)[] | null;
+}
+
+export interface AttributeCreate_attributeCreate_productType_variantAttributes_values {
+ __typename: "AttributeValue";
+ id: string;
+ name: string | null;
+ slug: string | null;
+}
+
+export interface AttributeCreate_attributeCreate_productType_variantAttributes {
+ __typename: "Attribute";
+ id: string;
+ name: string | null;
+ slug: string | null;
+ values: (AttributeCreate_attributeCreate_productType_variantAttributes_values | null)[] | null;
+}
+
+export interface AttributeCreate_attributeCreate_productType_weight {
+ __typename: "Weight";
+ unit: string;
+ value: number;
+}
+
+export interface AttributeCreate_attributeCreate_productType {
+ __typename: "ProductType";
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ isShippingRequired: boolean;
+ taxRate: TaxRateType | null;
+ productAttributes: (AttributeCreate_attributeCreate_productType_productAttributes | null)[] | null;
+ variantAttributes: (AttributeCreate_attributeCreate_productType_variantAttributes | null)[] | null;
+ weight: AttributeCreate_attributeCreate_productType_weight | null;
+}
+
export interface AttributeCreate_attributeCreate {
__typename: "AttributeCreate";
errors: (AttributeCreate_attributeCreate_errors | null)[] | null;
+ productType: AttributeCreate_attributeCreate_productType | null;
}
export interface AttributeCreate {
diff --git a/saleor/static/dashboard-next/productTypes/types/AttributeDelete.ts b/saleor/static/dashboard-next/productTypes/types/AttributeDelete.ts
index 7dd5091c49..034c90e6b6 100644
--- a/saleor/static/dashboard-next/productTypes/types/AttributeDelete.ts
+++ b/saleor/static/dashboard-next/productTypes/types/AttributeDelete.ts
@@ -1,6 +1,8 @@
/* tslint:disable */
// This file was automatically generated and should not be edited.
+import { TaxRateType } from "./../../types/globalTypes";
+
// ====================================================
// GraphQL mutation operation: AttributeDelete
// ====================================================
@@ -11,9 +13,58 @@ export interface AttributeDelete_attributeDelete_errors {
message: string | null;
}
+export interface AttributeDelete_attributeDelete_productType_productAttributes_values {
+ __typename: "AttributeValue";
+ id: string;
+ name: string | null;
+ slug: string | null;
+}
+
+export interface AttributeDelete_attributeDelete_productType_productAttributes {
+ __typename: "Attribute";
+ id: string;
+ name: string | null;
+ slug: string | null;
+ values: (AttributeDelete_attributeDelete_productType_productAttributes_values | null)[] | null;
+}
+
+export interface AttributeDelete_attributeDelete_productType_variantAttributes_values {
+ __typename: "AttributeValue";
+ id: string;
+ name: string | null;
+ slug: string | null;
+}
+
+export interface AttributeDelete_attributeDelete_productType_variantAttributes {
+ __typename: "Attribute";
+ id: string;
+ name: string | null;
+ slug: string | null;
+ values: (AttributeDelete_attributeDelete_productType_variantAttributes_values | null)[] | null;
+}
+
+export interface AttributeDelete_attributeDelete_productType_weight {
+ __typename: "Weight";
+ unit: string;
+ value: number;
+}
+
+export interface AttributeDelete_attributeDelete_productType {
+ __typename: "ProductType";
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ isShippingRequired: boolean;
+ taxRate: TaxRateType | null;
+ productAttributes: (AttributeDelete_attributeDelete_productType_productAttributes | null)[] | null;
+ variantAttributes: (AttributeDelete_attributeDelete_productType_variantAttributes | null)[] | null;
+ weight: AttributeDelete_attributeDelete_productType_weight | null;
+}
+
export interface AttributeDelete_attributeDelete {
__typename: "AttributeDelete";
errors: (AttributeDelete_attributeDelete_errors | null)[] | null;
+ productType: AttributeDelete_attributeDelete_productType | null;
}
export interface AttributeDelete {