Change attribute values to choices (#1129)
* Change attribute values to choices * Trigger CI
This commit is contained in:
parent
453e4192fe
commit
988b191690
41 changed files with 291 additions and 572 deletions
|
@ -413,7 +413,7 @@ type Attribute implements Node & ObjectWithMetadata {
|
|||
slug: String
|
||||
type: AttributeTypeEnum
|
||||
unit: MeasurementUnitsEnum
|
||||
values(filter: AttributeValueFilterInput, before: String, after: String, first: Int, last: Int): AttributeValueCountableConnection
|
||||
choices(sortBy: AttributeChoicesSortingInput, filter: AttributeValueFilterInput, before: String, after: String, first: Int, last: Int): AttributeValueCountableConnection
|
||||
valueRequired: Boolean!
|
||||
visibleInStorefront: Boolean!
|
||||
filterableInStorefront: Boolean!
|
||||
|
@ -429,6 +429,16 @@ type AttributeBulkDelete {
|
|||
errors: [AttributeError!]!
|
||||
}
|
||||
|
||||
enum AttributeChoicesSortField {
|
||||
NAME
|
||||
SLUG
|
||||
}
|
||||
|
||||
input AttributeChoicesSortingInput {
|
||||
direction: OrderDirection!
|
||||
field: AttributeChoicesSortField!
|
||||
}
|
||||
|
||||
type AttributeCountableConnection {
|
||||
pageInfo: PageInfo!
|
||||
edges: [AttributeCountableEdge!]!
|
||||
|
@ -809,7 +819,7 @@ type CategoryTranslation implements Node {
|
|||
id: ID!
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
name: String!
|
||||
name: String
|
||||
description: JSONString
|
||||
language: LanguageDisplay!
|
||||
descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||
|
@ -1283,7 +1293,7 @@ type CollectionTranslation implements Node {
|
|||
id: ID!
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
name: String!
|
||||
name: String
|
||||
description: JSONString
|
||||
language: LanguageDisplay!
|
||||
descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||
|
@ -1315,6 +1325,7 @@ enum ConfigurationTypeFieldEnum {
|
|||
SECRET
|
||||
PASSWORD
|
||||
SECRETMULTILINE
|
||||
OUTPUT
|
||||
}
|
||||
|
||||
type ConfirmAccount {
|
||||
|
@ -3606,6 +3617,7 @@ input PageFilterInput {
|
|||
search: String
|
||||
metadata: [MetadataInput]
|
||||
pageTypes: [ID]
|
||||
ids: [ID]
|
||||
}
|
||||
|
||||
type PageInfo {
|
||||
|
@ -3665,7 +3677,7 @@ type PageTranslation implements Node {
|
|||
id: ID!
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
title: String!
|
||||
title: String
|
||||
content: JSONString
|
||||
language: LanguageDisplay!
|
||||
contentJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.")
|
||||
|
@ -4411,7 +4423,7 @@ type ProductTranslation implements Node {
|
|||
id: ID!
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
name: String!
|
||||
name: String
|
||||
description: JSONString
|
||||
language: LanguageDisplay!
|
||||
descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { AttributeDetails_attribute_values } from "@saleor/attributes/types/AttributeDetails";
|
||||
import { AttributeDetails_attribute_choices } from "@saleor/attributes/types/AttributeDetails";
|
||||
import { ATTRIBUTE_TYPES_WITH_DEDICATED_VALUES } from "@saleor/attributes/utils/data";
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import CardSpacer from "@saleor/components/CardSpacer";
|
||||
|
@ -37,7 +37,7 @@ export interface AttributePageProps {
|
|||
disabled: boolean;
|
||||
errors: AttributeErrorFragment[];
|
||||
saveButtonBarState: ConfirmButtonTransitionState;
|
||||
values: AttributeDetails_attribute_values;
|
||||
values: AttributeDetails_attribute_choices;
|
||||
onBack: () => void;
|
||||
onDelete: () => void;
|
||||
onSubmit: (data: AttributePageFormData) => void;
|
||||
|
|
|
@ -29,7 +29,7 @@ export const attribute: AttributeDetails_attribute = {
|
|||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
__typename: "PageInfo" as "PageInfo",
|
||||
|
@ -82,7 +82,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "author",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -137,7 +137,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "box-size",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -222,7 +222,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "brand",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -262,7 +262,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "candy-box-size",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -332,7 +332,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "coffee-genre",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -387,7 +387,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "collar",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -457,7 +457,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "color",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -512,7 +512,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "cover",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -627,7 +627,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "flavor",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -682,7 +682,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "language",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -737,7 +737,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "publisher",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -792,7 +792,7 @@ export const attributes: Array<AttributeList_attributes_edges_node &
|
|||
slug: "size",
|
||||
type: AttributeTypeEnum.PRODUCT_TYPE,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
|
|
@ -102,7 +102,7 @@ const attributeValueDelete = gql`
|
|||
attributeValueDelete(id: $id) {
|
||||
attribute {
|
||||
id
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
@ -136,7 +136,7 @@ export const attributeValueUpdateMutation = gql`
|
|||
attributeValueUpdate(id: $id, input: $input) {
|
||||
attribute {
|
||||
id
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
@ -170,7 +170,7 @@ export const attributeValueCreateMutation = gql`
|
|||
attributeValueCreate(attribute: $id, input: $input) {
|
||||
attribute {
|
||||
id
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
@ -222,7 +222,7 @@ const attributeValueReorderMutation = gql`
|
|||
attributeReorderValues(attributeId: $id, moves: [$move]) {
|
||||
attribute {
|
||||
id
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
|
|
@ -25,7 +25,7 @@ const attributeDetails = gql`
|
|||
) {
|
||||
attribute(id: $id) {
|
||||
...AttributeDetailsFragment
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
|
|
@ -21,7 +21,7 @@ export interface AttributeDetails_attribute_privateMetadata {
|
|||
value: string;
|
||||
}
|
||||
|
||||
export interface AttributeDetails_attribute_values_pageInfo {
|
||||
export interface AttributeDetails_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -29,32 +29,32 @@ export interface AttributeDetails_attribute_values_pageInfo {
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeDetails_attribute_values_edges_node_file {
|
||||
export interface AttributeDetails_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeDetails_attribute_values_edges_node {
|
||||
export interface AttributeDetails_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: AttributeDetails_attribute_values_edges_node_file | null;
|
||||
file: AttributeDetails_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface AttributeDetails_attribute_values_edges {
|
||||
export interface AttributeDetails_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: AttributeDetails_attribute_values_edges_node;
|
||||
node: AttributeDetails_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface AttributeDetails_attribute_values {
|
||||
export interface AttributeDetails_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: AttributeDetails_attribute_values_pageInfo;
|
||||
edges: AttributeDetails_attribute_values_edges[];
|
||||
pageInfo: AttributeDetails_attribute_choices_pageInfo;
|
||||
edges: AttributeDetails_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface AttributeDetails_attribute {
|
||||
|
@ -74,7 +74,7 @@ export interface AttributeDetails_attribute {
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
storefrontSearchPosition: number;
|
||||
valueRequired: boolean;
|
||||
values: AttributeDetails_attribute_values | null;
|
||||
choices: AttributeDetails_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface AttributeDetails {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { AttributeValueCreateInput, AttributeErrorCode } from "./../../types/glo
|
|||
// GraphQL mutation operation: AttributeValueCreate
|
||||
// ====================================================
|
||||
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_values_pageInfo {
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -17,38 +17,38 @@ export interface AttributeValueCreate_attributeValueCreate_attribute_values_page
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_values_edges_node_file {
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_values_edges_node {
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: AttributeValueCreate_attributeValueCreate_attribute_values_edges_node_file | null;
|
||||
file: AttributeValueCreate_attributeValueCreate_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_values_edges {
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: AttributeValueCreate_attributeValueCreate_attribute_values_edges_node;
|
||||
node: AttributeValueCreate_attributeValueCreate_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_values {
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: AttributeValueCreate_attributeValueCreate_attribute_values_pageInfo;
|
||||
edges: AttributeValueCreate_attributeValueCreate_attribute_values_edges[];
|
||||
pageInfo: AttributeValueCreate_attributeValueCreate_attribute_choices_pageInfo;
|
||||
edges: AttributeValueCreate_attributeValueCreate_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface AttributeValueCreate_attributeValueCreate_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
values: AttributeValueCreate_attributeValueCreate_attribute_values | null;
|
||||
choices: AttributeValueCreate_attributeValueCreate_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueCreate_attributeValueCreate_errors {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { AttributeErrorCode } from "./../../types/globalTypes";
|
|||
// GraphQL mutation operation: AttributeValueDelete
|
||||
// ====================================================
|
||||
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_values_pageInfo {
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -17,38 +17,38 @@ export interface AttributeValueDelete_attributeValueDelete_attribute_values_page
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_values_edges_node_file {
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_values_edges_node {
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: AttributeValueDelete_attributeValueDelete_attribute_values_edges_node_file | null;
|
||||
file: AttributeValueDelete_attributeValueDelete_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_values_edges {
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: AttributeValueDelete_attributeValueDelete_attribute_values_edges_node;
|
||||
node: AttributeValueDelete_attributeValueDelete_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_values {
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: AttributeValueDelete_attributeValueDelete_attribute_values_pageInfo;
|
||||
edges: AttributeValueDelete_attributeValueDelete_attribute_values_edges[];
|
||||
pageInfo: AttributeValueDelete_attributeValueDelete_attribute_choices_pageInfo;
|
||||
edges: AttributeValueDelete_attributeValueDelete_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface AttributeValueDelete_attributeValueDelete_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
values: AttributeValueDelete_attributeValueDelete_attribute_values | null;
|
||||
choices: AttributeValueDelete_attributeValueDelete_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueDelete_attributeValueDelete_errors {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { ReorderInput, AttributeErrorCode } from "./../../types/globalTypes";
|
|||
// GraphQL mutation operation: AttributeValueReorder
|
||||
// ====================================================
|
||||
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute_values_pageInfo {
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -17,27 +17,27 @@ export interface AttributeValueReorder_attributeReorderValues_attribute_values_p
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute_values_edges_node {
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute_values_edges {
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: AttributeValueReorder_attributeReorderValues_attribute_values_edges_node;
|
||||
node: AttributeValueReorder_attributeReorderValues_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute_values {
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: AttributeValueReorder_attributeReorderValues_attribute_values_pageInfo;
|
||||
edges: AttributeValueReorder_attributeReorderValues_attribute_values_edges[];
|
||||
pageInfo: AttributeValueReorder_attributeReorderValues_attribute_choices_pageInfo;
|
||||
edges: AttributeValueReorder_attributeReorderValues_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface AttributeValueReorder_attributeReorderValues_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
values: AttributeValueReorder_attributeReorderValues_attribute_values | null;
|
||||
choices: AttributeValueReorder_attributeReorderValues_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueReorder_attributeReorderValues_errors {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { AttributeValueCreateInput, AttributeErrorCode } from "./../../types/glo
|
|||
// GraphQL mutation operation: AttributeValueUpdate
|
||||
// ====================================================
|
||||
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_values_pageInfo {
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -17,38 +17,38 @@ export interface AttributeValueUpdate_attributeValueUpdate_attribute_values_page
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_values_edges_node_file {
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_values_edges_node {
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: AttributeValueUpdate_attributeValueUpdate_attribute_values_edges_node_file | null;
|
||||
file: AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_values_edges {
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: AttributeValueUpdate_attributeValueUpdate_attribute_values_edges_node;
|
||||
node: AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_values {
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: AttributeValueUpdate_attributeValueUpdate_attribute_values_pageInfo;
|
||||
edges: AttributeValueUpdate_attributeValueUpdate_attribute_values_edges[];
|
||||
pageInfo: AttributeValueUpdate_attributeValueUpdate_attribute_choices_pageInfo;
|
||||
edges: AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
values: AttributeValueUpdate_attributeValueUpdate_attribute_values | null;
|
||||
choices: AttributeValueUpdate_attributeValueUpdate_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface AttributeValueUpdate_attributeValueUpdate_errors {
|
||||
|
|
|
@ -96,6 +96,7 @@ export const isFileValueUnused = (
|
|||
attributesWithNewFileValue: FormsetData<null, File>,
|
||||
existingAttribute:
|
||||
| PageDetails_page_attributes
|
||||
| ProductDetails_product_attributes
|
||||
| SelectedVariantAttributeFragment
|
||||
) => {
|
||||
if (existingAttribute.attribute.inputType !== AttributeInputTypeEnum.FILE) {
|
||||
|
|
|
@ -13,6 +13,7 @@ import {
|
|||
} from "@saleor/hooks/useFormset";
|
||||
import { PageDetails_page_attributes } from "@saleor/pages/types/PageDetails";
|
||||
import { ProductDetails_product_attributes } from "@saleor/products/types/ProductDetails";
|
||||
import { ProductVariantDetails_productVariant_nonSelectionAttributes } from "@saleor/products/types/ProductVariantDetails";
|
||||
import { FetchMoreProps, ReorderEvent } from "@saleor/types";
|
||||
import {
|
||||
AttributeEntityTypeEnum,
|
||||
|
@ -234,7 +235,9 @@ export const handleUploadMultipleFiles = async (
|
|||
export const handleDeleteMultipleAttributeValues = async (
|
||||
attributesWithNewFileValue: FormsetData<null, File>,
|
||||
attributes: Array<
|
||||
PageDetails_page_attributes | ProductDetails_product_attributes
|
||||
| PageDetails_page_attributes
|
||||
| ProductDetails_product_attributes
|
||||
| ProductVariantDetails_productVariant_nonSelectionAttributes
|
||||
>,
|
||||
deleteAttributeValue: (
|
||||
variables: AttributeValueDeleteVariables
|
||||
|
|
|
@ -73,7 +73,7 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
|
|||
|
||||
const paginationState = createPaginationState(settings?.rowNumber, params);
|
||||
const { loadNextPage, loadPreviousPage, pageInfo } = paginate(
|
||||
data?.attribute?.values?.pageInfo,
|
||||
data?.attribute?.choices?.pageInfo,
|
||||
paginationState,
|
||||
params
|
||||
);
|
||||
|
@ -175,14 +175,14 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
|
|||
__typename: "AttributeReorderValues",
|
||||
attribute: {
|
||||
...data.attribute,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
...data.attribute.values.pageInfo
|
||||
...data.attribute.choices.pageInfo
|
||||
},
|
||||
edges: move(
|
||||
data.attribute.values.edges[oldIndex],
|
||||
data.attribute.values.edges,
|
||||
data.attribute.choices.edges[oldIndex],
|
||||
data.attribute.choices.edges,
|
||||
(a, b) => a.node.id === b.node.id,
|
||||
newIndex
|
||||
)
|
||||
|
@ -194,7 +194,7 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
|
|||
variables: {
|
||||
id,
|
||||
move: {
|
||||
id: data.attribute.values.edges[oldIndex].node.id,
|
||||
id: data.attribute.choices.edges[oldIndex].node.id,
|
||||
sortOrder: newIndex - oldIndex
|
||||
},
|
||||
firstValues: settings.rowNumber,
|
||||
|
@ -251,7 +251,7 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
|
|||
})
|
||||
}
|
||||
saveButtonBarState={attributeUpdateOpts.status}
|
||||
values={maybe(() => data.attribute.values)}
|
||||
values={maybe(() => data.attribute.choices)}
|
||||
settings={settings}
|
||||
onUpdateListSettings={updateListSettings}
|
||||
pageInfo={pageInfo}
|
||||
|
@ -276,7 +276,7 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
|
|||
open={params.action === "remove-value"}
|
||||
name={maybe(
|
||||
() =>
|
||||
data.attribute.values.edges.find(
|
||||
data.attribute.choices.edges.find(
|
||||
value => params.id === value.node.id
|
||||
).node.name,
|
||||
"..."
|
||||
|
@ -317,7 +317,7 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
|
|||
<AttributeValueEditDialog
|
||||
attributeValue={maybe(
|
||||
() =>
|
||||
data.attribute.values.edges.find(
|
||||
data.attribute.choices.edges.find(
|
||||
value => params.id === value.node.id
|
||||
).node
|
||||
)}
|
||||
|
@ -331,7 +331,7 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
|
|||
onSubmit={input =>
|
||||
attributeValueUpdate({
|
||||
variables: {
|
||||
id: data.attribute.values.edges.find(
|
||||
id: data.attribute.choices.edges.find(
|
||||
value => params.id === value.node.id
|
||||
).node.id,
|
||||
input,
|
||||
|
|
|
@ -132,7 +132,7 @@ export const productVariantAttributesFragment = gql`
|
|||
entityType
|
||||
valueRequired
|
||||
unit
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
@ -150,7 +150,7 @@ export const productVariantAttributesFragment = gql`
|
|||
variantAttributes(variantSelection: VARIANT_SELECTION) {
|
||||
id
|
||||
name
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
|
|
@ -9,7 +9,7 @@ import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum,
|
|||
// GraphQL fragment: Product
|
||||
// ====================================================
|
||||
|
||||
export interface Product_attributes_attribute_values_pageInfo {
|
||||
export interface Product_attributes_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -17,32 +17,32 @@ export interface Product_attributes_attribute_values_pageInfo {
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface Product_attributes_attribute_values_edges_node_file {
|
||||
export interface Product_attributes_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface Product_attributes_attribute_values_edges_node {
|
||||
export interface Product_attributes_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: Product_attributes_attribute_values_edges_node_file | null;
|
||||
file: Product_attributes_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface Product_attributes_attribute_values_edges {
|
||||
export interface Product_attributes_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: Product_attributes_attribute_values_edges_node;
|
||||
node: Product_attributes_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface Product_attributes_attribute_values {
|
||||
export interface Product_attributes_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: Product_attributes_attribute_values_pageInfo;
|
||||
edges: Product_attributes_attribute_values_edges[];
|
||||
pageInfo: Product_attributes_attribute_choices_pageInfo;
|
||||
edges: Product_attributes_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface Product_attributes_attribute {
|
||||
|
@ -54,7 +54,7 @@ export interface Product_attributes_attribute {
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: Product_attributes_attribute_values | null;
|
||||
choices: Product_attributes_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface Product_attributes_values_file {
|
||||
|
@ -79,7 +79,7 @@ export interface Product_attributes {
|
|||
values: (Product_attributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface Product_productType_variantAttributes_values_pageInfo {
|
||||
export interface Product_productType_variantAttributes_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -87,39 +87,39 @@ export interface Product_productType_variantAttributes_values_pageInfo {
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface Product_productType_variantAttributes_values_edges_node_file {
|
||||
export interface Product_productType_variantAttributes_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface Product_productType_variantAttributes_values_edges_node {
|
||||
export interface Product_productType_variantAttributes_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: Product_productType_variantAttributes_values_edges_node_file | null;
|
||||
file: Product_productType_variantAttributes_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface Product_productType_variantAttributes_values_edges {
|
||||
export interface Product_productType_variantAttributes_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: Product_productType_variantAttributes_values_edges_node;
|
||||
node: Product_productType_variantAttributes_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface Product_productType_variantAttributes_values {
|
||||
export interface Product_productType_variantAttributes_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: Product_productType_variantAttributes_values_pageInfo;
|
||||
edges: Product_productType_variantAttributes_values_edges[];
|
||||
pageInfo: Product_productType_variantAttributes_choices_pageInfo;
|
||||
edges: Product_productType_variantAttributes_choices_edges[];
|
||||
}
|
||||
|
||||
export interface Product_productType_variantAttributes {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
name: string | null;
|
||||
values: Product_productType_variantAttributes_values | null;
|
||||
choices: Product_productType_variantAttributes_choices | null;
|
||||
}
|
||||
|
||||
export interface Product_productType_taxType {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum }
|
|||
// GraphQL fragment: ProductVariantAttributesFragment
|
||||
// ====================================================
|
||||
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_values_pageInfo {
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -17,32 +17,32 @@ export interface ProductVariantAttributesFragment_attributes_attribute_values_pa
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_values_edges_node_file {
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_values_edges_node {
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: ProductVariantAttributesFragment_attributes_attribute_values_edges_node_file | null;
|
||||
file: ProductVariantAttributesFragment_attributes_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_values_edges {
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: ProductVariantAttributesFragment_attributes_attribute_values_edges_node;
|
||||
node: ProductVariantAttributesFragment_attributes_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_values {
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: ProductVariantAttributesFragment_attributes_attribute_values_pageInfo;
|
||||
edges: ProductVariantAttributesFragment_attributes_attribute_values_edges[];
|
||||
pageInfo: ProductVariantAttributesFragment_attributes_attribute_choices_pageInfo;
|
||||
edges: ProductVariantAttributesFragment_attributes_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_attributes_attribute {
|
||||
|
@ -54,7 +54,7 @@ export interface ProductVariantAttributesFragment_attributes_attribute {
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: ProductVariantAttributesFragment_attributes_attribute_values | null;
|
||||
choices: ProductVariantAttributesFragment_attributes_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_attributes_values_file {
|
||||
|
@ -79,7 +79,7 @@ export interface ProductVariantAttributesFragment_attributes {
|
|||
values: (ProductVariantAttributesFragment_attributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_values_pageInfo {
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -87,39 +87,39 @@ export interface ProductVariantAttributesFragment_productType_variantAttributes_
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_values_edges_node_file {
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_values_edges_node {
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: ProductVariantAttributesFragment_productType_variantAttributes_values_edges_node_file | null;
|
||||
file: ProductVariantAttributesFragment_productType_variantAttributes_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_values_edges {
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: ProductVariantAttributesFragment_productType_variantAttributes_values_edges_node;
|
||||
node: ProductVariantAttributesFragment_productType_variantAttributes_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_values {
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: ProductVariantAttributesFragment_productType_variantAttributes_values_pageInfo;
|
||||
edges: ProductVariantAttributesFragment_productType_variantAttributes_values_edges[];
|
||||
pageInfo: ProductVariantAttributesFragment_productType_variantAttributes_choices_pageInfo;
|
||||
edges: ProductVariantAttributesFragment_productType_variantAttributes_choices_edges[];
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_productType_variantAttributes {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
name: string | null;
|
||||
values: ProductVariantAttributesFragment_productType_variantAttributes_values | null;
|
||||
choices: ProductVariantAttributesFragment_productType_variantAttributes_choices | null;
|
||||
}
|
||||
|
||||
export interface ProductVariantAttributesFragment_productType {
|
||||
|
|
|
@ -23,7 +23,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "author",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -79,7 +79,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "box-size",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -167,7 +167,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "brand",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -207,7 +207,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "candy-box-size",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -279,7 +279,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "coffee-genre",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -335,7 +335,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "collar",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -407,7 +407,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "color",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -463,7 +463,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "cover",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -583,7 +583,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "flavor",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -639,7 +639,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "language",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -695,7 +695,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "publisher",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -751,7 +751,7 @@ export const attributes: ProductType_productType_productAttributes[] = [
|
|||
slug: "size",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
|
|
@ -25,7 +25,7 @@ import { sectionNames } from "@saleor/intl";
|
|||
import ProductVariantPrice from "@saleor/products/components/ProductVariantPrice";
|
||||
import { ProductType_productType } from "@saleor/products/types/ProductType";
|
||||
import { getChoices } from "@saleor/products/utils/data";
|
||||
import { SearchAttributeValues_attribute_values_edges_node } from "@saleor/searches/types/SearchAttributeValues";
|
||||
import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues";
|
||||
import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories";
|
||||
import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections";
|
||||
import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages";
|
||||
|
@ -55,7 +55,7 @@ interface ProductCreatePageProps {
|
|||
currentChannels: ChannelData[];
|
||||
collections: SearchCollections_search_edges_node[];
|
||||
categories: SearchCategories_search_edges_node[];
|
||||
attributeValues: SearchAttributeValues_attribute_values_edges_node[];
|
||||
attributeValues: SearchAttributeValues_attribute_choices_edges_node[];
|
||||
loading: boolean;
|
||||
fetchMoreCategories: FetchMoreProps;
|
||||
fetchMoreCollections: FetchMoreProps;
|
||||
|
|
|
@ -29,7 +29,7 @@ import { maybe } from "@saleor/misc";
|
|||
import ProductExternalMediaDialog from "@saleor/products/components/ProductExternalMediaDialog";
|
||||
import ProductVariantPrice from "@saleor/products/components/ProductVariantPrice";
|
||||
import { ChannelsWithVariantsData } from "@saleor/products/views/ProductUpdate/types";
|
||||
import { SearchAttributeValues_attribute_values_edges_node } from "@saleor/searches/types/SearchAttributeValues";
|
||||
import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues";
|
||||
import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories";
|
||||
import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections";
|
||||
import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages";
|
||||
|
@ -76,7 +76,7 @@ export interface ProductUpdatePageProps extends ListActions, ChannelProps {
|
|||
placeholderImage: string;
|
||||
collections: SearchCollections_search_edges_node[];
|
||||
categories: SearchCategories_search_edges_node[];
|
||||
attributeValues: SearchAttributeValues_attribute_values_edges_node[];
|
||||
attributeValues: SearchAttributeValues_attribute_choices_edges_node[];
|
||||
disabled: boolean;
|
||||
fetchMoreCategories: FetchMoreProps;
|
||||
fetchMoreCollections: FetchMoreProps;
|
||||
|
|
|
@ -34,7 +34,7 @@ const price: Price = {
|
|||
attribute: selectedAttributes[0].id,
|
||||
channels,
|
||||
mode: "attribute",
|
||||
values: selectedAttributes[0].values.edges.map(attribute => ({
|
||||
values: selectedAttributes[0].choices.edges.map(attribute => ({
|
||||
slug: attribute.node.slug,
|
||||
value: channels
|
||||
}))
|
||||
|
@ -46,7 +46,7 @@ const stock: Stock = {
|
|||
value: selectedWarehouses.map(
|
||||
(_, warehouseIndex) => (warehouseIndex + 2) * 3
|
||||
),
|
||||
values: selectedAttributes[0].values.edges.map(
|
||||
values: selectedAttributes[0].choices.edges.map(
|
||||
(attribute, attributeIndex) => ({
|
||||
slug: attribute.node.slug,
|
||||
value: selectedWarehouses.map(
|
||||
|
@ -59,7 +59,7 @@ const stock: Stock = {
|
|||
|
||||
const dataAttributes = selectedAttributes.map(attribute => ({
|
||||
id: attribute.id,
|
||||
values: attribute.values.edges
|
||||
values: attribute.choices.edges
|
||||
.map(value => value.node.slug)
|
||||
.filter((_, valueIndex) => valueIndex % 2 !== 1)
|
||||
}));
|
||||
|
|
|
@ -118,7 +118,7 @@ function getVariantName(
|
|||
return attributes.reduce(
|
||||
(acc, attribute) => [
|
||||
...acc,
|
||||
attribute.values.edges.find(
|
||||
attribute.choices.edges.find(
|
||||
value =>
|
||||
value.node.slug ===
|
||||
variant.attributes.find(
|
||||
|
|
|
@ -71,7 +71,7 @@ const ProductVariantCreatorValues: React.FC<ProductVariantCreatorValuesProps> =
|
|||
className={classes.valueContainer}
|
||||
data-test-id="value-container"
|
||||
>
|
||||
{attribute.values.edges.map(({ node: value }) => (
|
||||
{attribute.choices.edges.map(({ node: value }) => (
|
||||
<Debounce
|
||||
debounceFn={() => onValueClick(attribute.id, value.slug)}
|
||||
time={100}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
ProductDetails_product_productType_variantAttributes,
|
||||
ProductDetails_product_productType_variantAttributes_values_edges_node
|
||||
ProductDetails_product_productType_variantAttributes_choices_edges_node
|
||||
} from "@saleor/products/types/ProductDetails";
|
||||
|
||||
import { ProductVariantCreateFormData } from "./form";
|
||||
|
@ -8,13 +8,13 @@ import { ProductVariantCreateFormData } from "./form";
|
|||
export function getPriceAttributeValues(
|
||||
data: ProductVariantCreateFormData,
|
||||
attributes: ProductDetails_product_productType_variantAttributes[]
|
||||
): ProductDetails_product_productType_variantAttributes_values_edges_node[] {
|
||||
): ProductDetails_product_productType_variantAttributes_choices_edges_node[] {
|
||||
return data.price.mode === "all"
|
||||
? null
|
||||
: data.price.attribute
|
||||
? attributes
|
||||
.find(attribute => attribute.id === data.price.attribute)
|
||||
.values.edges.filter(value =>
|
||||
.choices.edges.filter(value =>
|
||||
data.attributes
|
||||
.find(attribute => attribute.id === data.price.attribute)
|
||||
.values.includes(value.node.slug)
|
||||
|
@ -26,13 +26,13 @@ export function getPriceAttributeValues(
|
|||
export function getStockAttributeValues(
|
||||
data: ProductVariantCreateFormData,
|
||||
attributes: ProductDetails_product_productType_variantAttributes[]
|
||||
): ProductDetails_product_productType_variantAttributes_values_edges_node[] {
|
||||
): ProductDetails_product_productType_variantAttributes_choices_edges_node[] {
|
||||
return data.stock.mode === "all"
|
||||
? null
|
||||
: data.stock.attribute
|
||||
? attributes
|
||||
.find(attribute => attribute.id === data.stock.attribute)
|
||||
.values.edges.filter(value =>
|
||||
.choices.edges.filter(value =>
|
||||
data.attributes
|
||||
.find(attribute => attribute.id === data.stock.attribute)
|
||||
.values.includes(value.node.slug)
|
||||
|
|
|
@ -30,7 +30,7 @@ export const product: (
|
|||
slug: "Borders",
|
||||
valueRequired: false,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -92,7 +92,7 @@ export const product: (
|
|||
slug: "Legacy",
|
||||
valueRequired: true,
|
||||
unit: null,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -426,11 +426,8 @@ export const product: (
|
|||
{
|
||||
__typename: "Attribute",
|
||||
id: "isdugfhud",
|
||||
inputType: AttributeInputTypeEnum.FILE,
|
||||
name: "Attachment",
|
||||
slug: "attachment",
|
||||
valueRequired: true,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
@ -463,11 +460,8 @@ export const product: (
|
|||
{
|
||||
__typename: "Attribute",
|
||||
id: "pta18161",
|
||||
inputType: AttributeInputTypeEnum.DROPDOWN,
|
||||
name: "Color",
|
||||
slug: "color",
|
||||
valueRequired: true,
|
||||
values: {
|
||||
choices: {
|
||||
__typename: "AttributeValueCountableConnection",
|
||||
pageInfo: {
|
||||
endCursor: "WyI4IiwgIjMiXQ==",
|
||||
|
|
|
@ -76,7 +76,7 @@ const initialProductFilterAttributesQuery = gql`
|
|||
id
|
||||
name
|
||||
slug
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
@ -260,7 +260,7 @@ const productTypeQuery = gql`
|
|||
name
|
||||
valueRequired
|
||||
unit
|
||||
values(
|
||||
choices(
|
||||
first: $firstValues
|
||||
after: $afterValues
|
||||
last: $lastValues
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// GraphQL query operation: InitialProductFilterAttributes
|
||||
// ====================================================
|
||||
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node_values_pageInfo {
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -15,23 +15,23 @@ export interface InitialProductFilterAttributes_attributes_edges_node_values_pag
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node_values_edges_node {
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
}
|
||||
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node_values_edges {
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: InitialProductFilterAttributes_attributes_edges_node_values_edges_node;
|
||||
node: InitialProductFilterAttributes_attributes_edges_node_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node_values {
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: InitialProductFilterAttributes_attributes_edges_node_values_pageInfo;
|
||||
edges: InitialProductFilterAttributes_attributes_edges_node_values_edges[];
|
||||
pageInfo: InitialProductFilterAttributes_attributes_edges_node_choices_pageInfo;
|
||||
edges: InitialProductFilterAttributes_attributes_edges_node_choices_edges[];
|
||||
}
|
||||
|
||||
export interface InitialProductFilterAttributes_attributes_edges_node {
|
||||
|
@ -39,7 +39,7 @@ export interface InitialProductFilterAttributes_attributes_edges_node {
|
|||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
values: InitialProductFilterAttributes_attributes_edges_node_values | null;
|
||||
choices: InitialProductFilterAttributes_attributes_edges_node_choices | null;
|
||||
}
|
||||
|
||||
export interface InitialProductFilterAttributes_attributes_edges {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum,
|
|||
// GraphQL query operation: ProductDetails
|
||||
// ====================================================
|
||||
|
||||
export interface ProductDetails_product_attributes_attribute_values_pageInfo {
|
||||
export interface ProductDetails_product_attributes_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -17,32 +17,32 @@ export interface ProductDetails_product_attributes_attribute_values_pageInfo {
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_attributes_attribute_values_edges_node_file {
|
||||
export interface ProductDetails_product_attributes_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_attributes_attribute_values_edges_node {
|
||||
export interface ProductDetails_product_attributes_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: ProductDetails_product_attributes_attribute_values_edges_node_file | null;
|
||||
file: ProductDetails_product_attributes_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_attributes_attribute_values_edges {
|
||||
export interface ProductDetails_product_attributes_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: ProductDetails_product_attributes_attribute_values_edges_node;
|
||||
node: ProductDetails_product_attributes_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_attributes_attribute_values {
|
||||
export interface ProductDetails_product_attributes_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: ProductDetails_product_attributes_attribute_values_pageInfo;
|
||||
edges: ProductDetails_product_attributes_attribute_values_edges[];
|
||||
pageInfo: ProductDetails_product_attributes_attribute_choices_pageInfo;
|
||||
edges: ProductDetails_product_attributes_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_attributes_attribute {
|
||||
|
@ -54,7 +54,7 @@ export interface ProductDetails_product_attributes_attribute {
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: ProductDetails_product_attributes_attribute_values | null;
|
||||
choices: ProductDetails_product_attributes_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_attributes_values_file {
|
||||
|
@ -79,7 +79,7 @@ export interface ProductDetails_product_attributes {
|
|||
values: (ProductDetails_product_attributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_productType_variantAttributes_values_pageInfo {
|
||||
export interface ProductDetails_product_productType_variantAttributes_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -87,39 +87,39 @@ export interface ProductDetails_product_productType_variantAttributes_values_pag
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_productType_variantAttributes_values_edges_node_file {
|
||||
export interface ProductDetails_product_productType_variantAttributes_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_productType_variantAttributes_values_edges_node {
|
||||
export interface ProductDetails_product_productType_variantAttributes_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: ProductDetails_product_productType_variantAttributes_values_edges_node_file | null;
|
||||
file: ProductDetails_product_productType_variantAttributes_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_productType_variantAttributes_values_edges {
|
||||
export interface ProductDetails_product_productType_variantAttributes_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: ProductDetails_product_productType_variantAttributes_values_edges_node;
|
||||
node: ProductDetails_product_productType_variantAttributes_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_productType_variantAttributes_values {
|
||||
export interface ProductDetails_product_productType_variantAttributes_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: ProductDetails_product_productType_variantAttributes_values_pageInfo;
|
||||
edges: ProductDetails_product_productType_variantAttributes_values_edges[];
|
||||
pageInfo: ProductDetails_product_productType_variantAttributes_choices_pageInfo;
|
||||
edges: ProductDetails_product_productType_variantAttributes_choices_edges[];
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_productType_variantAttributes {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
name: string | null;
|
||||
values: ProductDetails_product_productType_variantAttributes_values | null;
|
||||
choices: ProductDetails_product_productType_variantAttributes_choices | null;
|
||||
}
|
||||
|
||||
export interface ProductDetails_product_productType_taxType {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum }
|
|||
// GraphQL query operation: ProductType
|
||||
// ====================================================
|
||||
|
||||
export interface ProductType_productType_productAttributes_values_pageInfo {
|
||||
export interface ProductType_productType_productAttributes_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -17,32 +17,32 @@ export interface ProductType_productType_productAttributes_values_pageInfo {
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface ProductType_productType_productAttributes_values_edges_node_file {
|
||||
export interface ProductType_productType_productAttributes_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface ProductType_productType_productAttributes_values_edges_node {
|
||||
export interface ProductType_productType_productAttributes_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: ProductType_productType_productAttributes_values_edges_node_file | null;
|
||||
file: ProductType_productType_productAttributes_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface ProductType_productType_productAttributes_values_edges {
|
||||
export interface ProductType_productType_productAttributes_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: ProductType_productType_productAttributes_values_edges_node;
|
||||
node: ProductType_productType_productAttributes_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface ProductType_productType_productAttributes_values {
|
||||
export interface ProductType_productType_productAttributes_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: ProductType_productType_productAttributes_values_pageInfo;
|
||||
edges: ProductType_productType_productAttributes_values_edges[];
|
||||
pageInfo: ProductType_productType_productAttributes_choices_pageInfo;
|
||||
edges: ProductType_productType_productAttributes_choices_edges[];
|
||||
}
|
||||
|
||||
export interface ProductType_productType_productAttributes {
|
||||
|
@ -54,7 +54,7 @@ export interface ProductType_productType_productAttributes {
|
|||
name: string | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: ProductType_productType_productAttributes_values | null;
|
||||
choices: ProductType_productType_productAttributes_choices | null;
|
||||
}
|
||||
|
||||
export interface ProductType_productType_taxType {
|
||||
|
|
|
@ -16,7 +16,7 @@ export interface ProductUpdate_productUpdate_errors {
|
|||
attributes: string[] | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_values_pageInfo {
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -24,32 +24,32 @@ export interface ProductUpdate_productUpdate_product_attributes_attribute_values
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_values_edges_node_file {
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_values_edges_node {
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: ProductUpdate_productUpdate_product_attributes_attribute_values_edges_node_file | null;
|
||||
file: ProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_values_edges {
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: ProductUpdate_productUpdate_product_attributes_attribute_values_edges_node;
|
||||
node: ProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_values {
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: ProductUpdate_productUpdate_product_attributes_attribute_values_pageInfo;
|
||||
edges: ProductUpdate_productUpdate_product_attributes_attribute_values_edges[];
|
||||
pageInfo: ProductUpdate_productUpdate_product_attributes_attribute_choices_pageInfo;
|
||||
edges: ProductUpdate_productUpdate_product_attributes_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_attributes_attribute {
|
||||
|
@ -61,7 +61,7 @@ export interface ProductUpdate_productUpdate_product_attributes_attribute {
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: ProductUpdate_productUpdate_product_attributes_attribute_values | null;
|
||||
choices: ProductUpdate_productUpdate_product_attributes_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_attributes_values_file {
|
||||
|
@ -86,7 +86,7 @@ export interface ProductUpdate_productUpdate_product_attributes {
|
|||
values: (ProductUpdate_productUpdate_product_attributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_values_pageInfo {
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -94,39 +94,39 @@ export interface ProductUpdate_productUpdate_product_productType_variantAttribut
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_values_edges_node_file {
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_values_edges_node {
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: ProductUpdate_productUpdate_product_productType_variantAttributes_values_edges_node_file | null;
|
||||
file: ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_values_edges {
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: ProductUpdate_productUpdate_product_productType_variantAttributes_values_edges_node;
|
||||
node: ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_values {
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: ProductUpdate_productUpdate_product_productType_variantAttributes_values_pageInfo;
|
||||
edges: ProductUpdate_productUpdate_product_productType_variantAttributes_values_edges[];
|
||||
pageInfo: ProductUpdate_productUpdate_product_productType_variantAttributes_choices_pageInfo;
|
||||
edges: ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges[];
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_productType_variantAttributes {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
name: string | null;
|
||||
values: ProductUpdate_productUpdate_product_productType_variantAttributes_values | null;
|
||||
choices: ProductUpdate_productUpdate_product_productType_variantAttributes_choices | null;
|
||||
}
|
||||
|
||||
export interface ProductUpdate_productUpdate_product_productType_taxType {
|
||||
|
|
|
@ -16,7 +16,7 @@ export interface SimpleProductUpdate_productUpdate_errors {
|
|||
attributes: string[] | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_values_pageInfo {
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -24,32 +24,32 @@ export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_values_edges_node_file {
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_values_edges_node {
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productUpdate_product_attributes_attribute_values_edges_node_file | null;
|
||||
file: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_values_edges {
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productUpdate_product_attributes_attribute_values_edges_node;
|
||||
node: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_values {
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productUpdate_product_attributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productUpdate_product_attributes_attribute_values_edges[];
|
||||
pageInfo: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_pageInfo;
|
||||
edges: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_attribute {
|
||||
|
@ -61,7 +61,7 @@ export interface SimpleProductUpdate_productUpdate_product_attributes_attribute
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productUpdate_product_attributes_attribute_values | null;
|
||||
choices: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_attributes_values_file {
|
||||
|
@ -86,7 +86,7 @@ export interface SimpleProductUpdate_productUpdate_product_attributes {
|
|||
values: (SimpleProductUpdate_productUpdate_product_attributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values_pageInfo {
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -94,39 +94,39 @@ export interface SimpleProductUpdate_productUpdate_product_productType_variantAt
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values_edges_node_file {
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values_edges_node {
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values_edges_node_file | null;
|
||||
file: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values_edges {
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values_edges_node;
|
||||
node: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values {
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values_edges[];
|
||||
pageInfo: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_pageInfo;
|
||||
edges: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
name: string | null;
|
||||
values: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_values | null;
|
||||
choices: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productUpdate_product_productType_taxType {
|
||||
|
@ -353,42 +353,6 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_private
|
|||
value: string;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
|
@ -398,7 +362,6 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_selecti
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_values | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_values_file {
|
||||
|
@ -423,42 +386,6 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_selecti
|
|||
values: (SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
|
@ -468,7 +395,6 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSele
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_values | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values_file {
|
||||
|
@ -684,42 +610,6 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_p
|
|||
value: string;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
|
@ -729,7 +619,6 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_s
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_values | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_values_file {
|
||||
|
@ -754,42 +643,6 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_s
|
|||
values: (SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
|
@ -799,7 +652,6 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_n
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_values | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_values_file {
|
||||
|
@ -1014,42 +866,6 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_p
|
|||
value: string;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
|
@ -1059,7 +875,6 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_s
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_values | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_values_file {
|
||||
|
@ -1084,42 +899,6 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_s
|
|||
values: (SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
|
@ -1129,7 +908,6 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_n
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_values | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_values_file {
|
||||
|
@ -1345,42 +1123,6 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_p
|
|||
value: string;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
|
@ -1390,7 +1132,6 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_s
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_values | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values_file {
|
||||
|
@ -1415,42 +1156,6 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_s
|
|||
values: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values | null)[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
cursor: string;
|
||||
node: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values_edges_node;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
pageInfo: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values_pageInfo;
|
||||
edges: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values_edges[];
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
|
@ -1460,7 +1165,6 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_n
|
|||
entityType: AttributeEntityTypeEnum | null;
|
||||
valueRequired: boolean;
|
||||
unit: MeasurementUnitsEnum | null;
|
||||
values: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_values | null;
|
||||
}
|
||||
|
||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values_file {
|
||||
|
|
|
@ -52,7 +52,7 @@ export function getAttributeInputFromProduct(
|
|||
inputType: attribute.attribute.inputType,
|
||||
isRequired: attribute.attribute.valueRequired,
|
||||
selectedValues: attribute.values,
|
||||
values: mapEdgesToItems(attribute.attribute.values),
|
||||
values: mapEdgesToItems(attribute.attribute.choices),
|
||||
unit: attribute.attribute.unit
|
||||
},
|
||||
id: attribute.attribute.id,
|
||||
|
@ -71,7 +71,7 @@ export function getAttributeInputFromProductType(
|
|||
entityType: attribute.entityType,
|
||||
inputType: attribute.inputType,
|
||||
isRequired: attribute.valueRequired,
|
||||
values: mapEdgesToItems(attribute.values),
|
||||
values: mapEdgesToItems(attribute.choices),
|
||||
unit: attribute.unit
|
||||
},
|
||||
id: attribute.id,
|
||||
|
|
|
@ -258,7 +258,7 @@ export const ProductCreateView: React.FC<ProductCreateProps> = ({ params }) => {
|
|||
onFetchMore: loadMoreProducts
|
||||
};
|
||||
const fetchMoreAttributeValues = {
|
||||
hasMore: !!searchAttributeValuesOpts.data?.attribute?.values?.pageInfo
|
||||
hasMore: !!searchAttributeValuesOpts.data?.attribute?.choices?.pageInfo
|
||||
?.hasNextPage,
|
||||
loading: !!searchAttributeValuesOpts.loading,
|
||||
onFetchMore: loadMoreAttributeValues
|
||||
|
@ -302,7 +302,7 @@ export const ProductCreateView: React.FC<ProductCreateProps> = ({ params }) => {
|
|||
categories={mapEdgesToItems(searchCategoryOpts?.data?.search)}
|
||||
collections={mapEdgesToItems(searchCollectionOpts?.data?.search)}
|
||||
attributeValues={mapEdgesToItems(
|
||||
searchAttributeValuesOpts?.data?.attribute.values
|
||||
searchAttributeValuesOpts?.data?.attribute.choices
|
||||
)}
|
||||
loading={loading}
|
||||
channelsErrors={
|
||||
|
|
|
@ -68,7 +68,7 @@ export function getFilterOpts(
|
|||
.sort((a, b) => (a.name > b.name ? 1 : -1))
|
||||
.map(attr => ({
|
||||
active: maybe(() => params.attributes[attr.slug].length > 0, false),
|
||||
choices: attr.values?.edges?.map(val => ({
|
||||
choices: attr.choices?.edges?.map(val => ({
|
||||
label: val.node.name,
|
||||
value: val.node.slug
|
||||
})),
|
||||
|
|
|
@ -9,15 +9,15 @@ import { StockAvailability } from "@saleor/types/globalTypes";
|
|||
export const productListFilterOpts: ProductListFilterOpts = {
|
||||
attributes: attributes.map(attr => ({
|
||||
active: false,
|
||||
choices: attr.values.edges.map(val => ({
|
||||
choices: attr.choices.edges.map(val => ({
|
||||
label: val.node.name,
|
||||
value: val.node.slug
|
||||
})),
|
||||
name: attr.name,
|
||||
slug: attr.slug,
|
||||
value: [
|
||||
attr.values.edges[0].node.slug,
|
||||
attr.values.edges.length > 2 && attr.values.edges[2].node.slug
|
||||
attr.choices.edges[0].node.slug,
|
||||
attr.choices.edges.length > 2 && attr.choices.edges[2].node.slug
|
||||
]
|
||||
})),
|
||||
categories: {
|
||||
|
|
|
@ -448,7 +448,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
|||
const collections = mapEdgesToItems(searchCollectionsOpts?.data?.search);
|
||||
|
||||
const attributeValues = mapEdgesToItems(
|
||||
searchAttributeValuesOpts?.data?.attribute.values
|
||||
searchAttributeValuesOpts?.data?.attribute.choices
|
||||
);
|
||||
|
||||
const errors = [
|
||||
|
@ -488,7 +488,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
|||
);
|
||||
|
||||
const fetchMoreAttributeValues = {
|
||||
hasMore: !!searchAttributeValuesOpts.data?.attribute?.values?.pageInfo
|
||||
hasMore: !!searchAttributeValuesOpts.data?.attribute?.choices?.pageInfo
|
||||
?.hasNextPage,
|
||||
loading: !!searchAttributeValuesOpts.loading,
|
||||
onFetchMore: loadMoreAttributeValues
|
||||
|
|
|
@ -162,7 +162,7 @@ export function createUpdateHandler(
|
|||
attributes:
|
||||
product.productType.variantAttributes?.map(attribute => ({
|
||||
id: attribute.id,
|
||||
values: attribute.values.edges.map(value => value.node.slug)
|
||||
values: attribute.choices.edges.map(value => value.node.slug)
|
||||
})) || [],
|
||||
product: product.id,
|
||||
sku: data.sku,
|
||||
|
|
|
@ -67,7 +67,12 @@ const ProductVariantCreator: React.FC<ProductVariantCreatorProps> = ({
|
|||
name: listing.channel.name,
|
||||
price: ""
|
||||
}))}
|
||||
attributes={data?.product?.productType?.variantAttributes || []}
|
||||
attributes={
|
||||
data?.product?.productType?.variantAttributes?.map(attr => ({
|
||||
...attr,
|
||||
choices: attr.values
|
||||
})) || []
|
||||
}
|
||||
limits={limitOpts.data?.shop?.limits}
|
||||
onSubmit={inputs =>
|
||||
bulkProductVariantCreate({
|
||||
|
|
|
@ -7,28 +7,28 @@
|
|||
// GraphQL query operation: SearchAttributeValues
|
||||
// ====================================================
|
||||
|
||||
export interface SearchAttributeValues_attribute_values_edges_node_file {
|
||||
export interface SearchAttributeValues_attribute_choices_edges_node_file {
|
||||
__typename: "File";
|
||||
url: string;
|
||||
contentType: string | null;
|
||||
}
|
||||
|
||||
export interface SearchAttributeValues_attribute_values_edges_node {
|
||||
export interface SearchAttributeValues_attribute_choices_edges_node {
|
||||
__typename: "AttributeValue";
|
||||
id: string;
|
||||
name: string | null;
|
||||
slug: string | null;
|
||||
file: SearchAttributeValues_attribute_values_edges_node_file | null;
|
||||
file: SearchAttributeValues_attribute_choices_edges_node_file | null;
|
||||
reference: string | null;
|
||||
richText: any | null;
|
||||
}
|
||||
|
||||
export interface SearchAttributeValues_attribute_values_edges {
|
||||
export interface SearchAttributeValues_attribute_choices_edges {
|
||||
__typename: "AttributeValueCountableEdge";
|
||||
node: SearchAttributeValues_attribute_values_edges_node;
|
||||
node: SearchAttributeValues_attribute_choices_edges_node;
|
||||
}
|
||||
|
||||
export interface SearchAttributeValues_attribute_values_pageInfo {
|
||||
export interface SearchAttributeValues_attribute_choices_pageInfo {
|
||||
__typename: "PageInfo";
|
||||
endCursor: string | null;
|
||||
hasNextPage: boolean;
|
||||
|
@ -36,16 +36,16 @@ export interface SearchAttributeValues_attribute_values_pageInfo {
|
|||
startCursor: string | null;
|
||||
}
|
||||
|
||||
export interface SearchAttributeValues_attribute_values {
|
||||
export interface SearchAttributeValues_attribute_choices {
|
||||
__typename: "AttributeValueCountableConnection";
|
||||
edges: SearchAttributeValues_attribute_values_edges[];
|
||||
pageInfo: SearchAttributeValues_attribute_values_pageInfo;
|
||||
edges: SearchAttributeValues_attribute_choices_edges[];
|
||||
pageInfo: SearchAttributeValues_attribute_choices_pageInfo;
|
||||
}
|
||||
|
||||
export interface SearchAttributeValues_attribute {
|
||||
__typename: "Attribute";
|
||||
id: string;
|
||||
values: SearchAttributeValues_attribute_values | null;
|
||||
choices: SearchAttributeValues_attribute_choices | null;
|
||||
}
|
||||
|
||||
export interface SearchAttributeValues {
|
||||
|
|
|
@ -19,7 +19,7 @@ export const searchAttributeValues = gql`
|
|||
) {
|
||||
attribute(id: $id) {
|
||||
id
|
||||
values(after: $after, first: $first, filter: { search: $query }) {
|
||||
choices(after: $after, first: $first, filter: { search: $query }) {
|
||||
edges {
|
||||
node {
|
||||
...AttributeValueFragment
|
||||
|
@ -37,12 +37,12 @@ export default makeSearch<
|
|||
SearchAttributeValues,
|
||||
SearchAttributeValuesVariables
|
||||
>(searchAttributeValues, result => {
|
||||
if (result.data?.attribute.values.pageInfo.hasNextPage) {
|
||||
if (result.data?.attribute.choices.pageInfo.hasNextPage) {
|
||||
result.loadMore(
|
||||
(prev, next) => {
|
||||
if (
|
||||
prev.attribute.values.pageInfo.endCursor ===
|
||||
next.attribute.values.pageInfo.endCursor
|
||||
prev.attribute.choices.pageInfo.endCursor ===
|
||||
next.attribute.choices.pageInfo.endCursor
|
||||
) {
|
||||
return prev;
|
||||
}
|
||||
|
@ -51,20 +51,20 @@ export default makeSearch<
|
|||
...prev,
|
||||
attribute: {
|
||||
...prev.attribute,
|
||||
values: {
|
||||
...prev.attribute.values,
|
||||
choices: {
|
||||
...prev.attribute.choices,
|
||||
edges: [
|
||||
...prev.attribute.values.edges,
|
||||
...next.attribute.values.edges
|
||||
...prev.attribute.choices.edges,
|
||||
...next.attribute.choices.edges
|
||||
],
|
||||
pageInfo: next.attribute.values.pageInfo
|
||||
pageInfo: next.attribute.choices.pageInfo
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
{
|
||||
...result.variables,
|
||||
after: result.data.attribute.values.pageInfo.endCursor
|
||||
after: result.data.attribute.choices.pageInfo.endCursor
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ const props: AttributePageProps = {
|
|||
onValueReorder: () => undefined,
|
||||
onValueUpdate: () => undefined,
|
||||
saveButtonBarState: "default",
|
||||
values: attribute.values,
|
||||
values: attribute.choices,
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false
|
||||
|
|
|
@ -9,7 +9,7 @@ import AttributeValueEditDialog, {
|
|||
import Decorator from "../../Decorator";
|
||||
|
||||
const props: AttributeValueEditDialogProps = {
|
||||
attributeValue: attribute.values[0],
|
||||
attributeValue: attribute.choices[0],
|
||||
confirmButtonState: "default",
|
||||
disabled: false,
|
||||
errors: [],
|
||||
|
|
Loading…
Reference in a new issue