Skip to content

Commit

Permalink
Merge pull request #151 from loginesta/LYNX-104
Browse files Browse the repository at this point in the history
Beta2: Different tasks from Custom product EAV in GraphQL epic (LYNX-52)
  • Loading branch information
keharper committed Jul 27, 2023
2 parents db140ff + 859101c commit d58aea6
Show file tree
Hide file tree
Showing 14 changed files with 828 additions and 73 deletions.
43 changes: 43 additions & 0 deletions src/pages/_includes/graphql/attribute-value-interface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
### AttributeValueInterface attributes

import BetaNote from '/src/pages/_includes/graphql/notes/beta.md'

<BetaNote />

The `AttributeValueInterface` contains the following attributes:

Attribute | Data Type | Description
--- | --- | ---
`code` | ID! | The attribute code
`is_comparable` | Boolean | Whether a product or category attribute can be compared against another or not
`is_filterable` | Boolean | Whether a product or category attribute can be filtered or not
`is_filterable_in_search` | Boolean | Whether a product or category attribute can be filtered in search or not
`is_html_allowed_on_front` | Boolean | Whether a product or category attribute can use HTML on front or not
`is_searchable` | Boolean | Whether a product or category attribute can be searched or not
`is_used_for_price_rules` | Boolean | Whether a product or category attribute can be used for price rules or not
`is_used_for_promo_rules` | Boolean | Whether a product or category attribute is used for promo rules or not
`is_visible_in_advanced_search` | Boolean | Whether a product or category attribute is visible in advanced search or not
`is_visible_on_front` | Boolean | Whether a product or category attribute is visible on front or not
`is_wysiwyg_enabled` | Boolean | Whether a product or category attribute has WYSIWYG enabled or not
`used_in_product_listing` | Boolean | Whether a product or category attribute is used in product listing or not

Currently, `AttributeValueInterface` has two different implementations: `AttributeValue` and `AttributeSelectedOptions`.

In addition to the attributes described for `AttributeValueInterface`, the `AttributeValue` contains the following:

Attribute | Data Type | Description
--- | --- | ---
`value` | String! | The attribute value

The `AttributeSelectedOptions` object contains the following attributes:

Attribute | Data Type | Description
--- | --- | ---
`selected_options` | [AttributeSelectedOptionInterface!]! | An array containing selected options for a select or multiselect attribute

The `AttributeSelectedOptionInterface` contains the following attributes:

Attribute | Data Type | Description
--- | --- | ---
`label` | String! | The attribute selected option label
`value` | String! | The attribute selected option value
4 changes: 4 additions & 0 deletions src/pages/_includes/graphql/cart-address-input-24.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ Attribute | Data Type | Description
`city` | String! | The city specified for the billing or shipping address
`company` | String | The company specified for the billing or shipping address
`country_code` | String! | The country code and label for the billing or shipping address
`fax` | String | The customer's fax number
`firstname` | String! | The customer's first name
`lastname` | String! | The customer's last name
`middlename`| String | The middle name of the person associated with the billing/shipping address
`postcode` | String | The postal code for the billing or shipping address
`prefix` | String | An honorific, such as Dr., Mr., or Mrs.
`region` | String | The region code for the billing or shipping address
`region_id` | Int | The unique ID that identifies the region for the billing or shipping address
`save_in_address_book` | Boolean | Determines whether to save the address in the customer's address book. The default value is true
`suffix` | String | A value such as Sr., Jr., or III
`street` | [String]! | An array containing the street for the billing or shipping address
`telephone` | String | The telephone number for the billing or shipping address
`vat_id` | String | The VAT company identification number for billing or shipping address
15 changes: 12 additions & 3 deletions src/pages/_includes/graphql/customer-address-output-24.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,18 @@ The `AttributeValueInterface` contains the following attributes:

Attribute | Data Type | Description
--- | --- | ---
`code` | String! | The attribute code
`uid` | ID! | The unique ID of an attribute value
`code` | ID! | The attribute code
`is_comparable` | Boolean | Whether a product or category attribute can be compared against another or not
`is_filterable` | Boolean | Whether a product or category attribute can be filtered or not
`is_filterable_in_search` | Boolean | Whether a product or category attribute can be filtered in search or not
`is_html_allowed_on_front` | Boolean | Whether a product or category attribute can use HTML on front or not
`is_searchable` | Boolean | Whether a product or category attribute can be searched or not
`is_used_for_price_rules` | Boolean | Whether a product or category attribute can be used for price rules or not
`is_used_for_promo_rules` | Boolean | Whether a product or category attribute is used for promo rules or not
`is_visible_in_advanced_search` | Boolean | Whether a product or category attribute is visible in advanced search or not
`is_visible_on_front` | Boolean | Whether a product or category attribute is visible on front or not
`is_wysiwyg_enabled` | Boolean | Whether a product or category attribute has WYSIWYG enabled or not
`used_in_product_listing` | Boolean | Whether a product or category attribute is used in product listing or not

Currently, `AttributeValueInterface` has two different implementations: `AttributeValue` and `AttributeSelectedOptions`.

Expand All @@ -62,7 +72,6 @@ The `AttributeSelectedOptionInterface` contains the following attributes:
Attribute | Data Type | Description
--- | --- | ---
`label` | String! | The attribute selected option label
`uid` | ID! | The unique ID of an attribute selected option
`value` | String! | The attribute selected option value

### CustomerAddressAttribute attributes
Expand Down
19 changes: 14 additions & 5 deletions src/pages/_includes/graphql/customer-output-24.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Attribute | Data Type | Description
`compare_list` | CompareList | The contents of the customer's comparison list
`created_at` | String | Timestamp indicating when the account was created
`custom_attributes` | [CustomerAddressAttribute](#customeraddress-attributes) | Deprecated. Use `custom_attributesV2` instead
`custom_attributes(uids: [ID!])` | [AttributeValueInterface](#attributevalueinterface-attributes)| Custom attributes assigned to the customer address (2.4.7-beta only)
`custom_attributesV2(attributeCodes: [ID!])` | [AttributeValueInterface](#attributevalueinterface-attributes)| Custom attributes assigned to the customer address (2.4.7-beta only)
`date_of_birth` | String | The customer's date of birth. In keeping with current security and privacy best practices, be sure you are aware of any potential legal and security risks associated with the storage of customers' full date of birth (month, day, year) along with other personal identifiers, such as full name, before collecting or processing such data.
`default_billing` | String | The ID assigned to the billing address
`default_shipping` | String | The ID assigned to the shipping address
Expand Down Expand Up @@ -48,10 +48,20 @@ import BetaNote from '/src/pages/_includes/graphql/notes/beta.md'

The `AttributeValueInterface` contains the following attributes:

Attribute | Data Type | Description
Attribute | Data Type | Description
--- | --- | ---
`code` | String! | The attribute code
`uid` | ID! | The unique ID of an attribute value
`code` | ID! | The attribute code
`is_comparable` | Boolean | Whether a product or category attribute can be compared against another or not
`is_filterable` | Boolean | Whether a product or category attribute can be filtered or not
`is_filterable_in_search` | Boolean | Whether a product or category attribute can be filtered in search or not
`is_html_allowed_on_front` | Boolean | Whether a product or category attribute can use HTML on front or not
`is_searchable` | Boolean | Whether a product or category attribute can be searched or not
`is_used_for_price_rules` | Boolean | Whether a product or category attribute can be used for price rules or not
`is_used_for_promo_rules` | Boolean | Whether a product or category attribute is used for promo rules or not
`is_visible_in_advanced_search` | Boolean | Whether a product or category attribute is visible in advanced search or not
`is_visible_on_front` | Boolean | Whether a product or category attribute is visible on front or not
`is_wysiwyg_enabled` | Boolean | Whether a product or category attribute has WYSIWYG enabled or not
`used_in_product_listing` | Boolean | Whether a product or category attribute is used in product listing or not

Currently, `AttributeValueInterface` has two different implementations: `AttributeValue` and `AttributeSelectedOptions`.

Expand All @@ -72,5 +82,4 @@ The `AttributeSelectedOptionInterface` contains the following attributes:
Attribute | Data Type | Description
--- | --- | ---
`label` | String! | The attribute selected option label
`uid` | ID! | The unique ID of an attribute selected option
`value` | String! | The attribute selected option value
3 changes: 2 additions & 1 deletion src/pages/_includes/graphql/return.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ The ReturnItem object provides details about an individual item in a return requ

Attribute | Data Type | Description
--- | --- | ---
`custom_attributes` | [[ReturnCustomAttribute]](#returncustomattribute-attributes) | Return item custom attributes that are visible on the storefront
`custom_attributes` | [[ReturnCustomAttribute]](#returncustomattribute-attributes) | Deprecated. Use `custom_attributesV2` instead
`custom_attributesV2` | [AttributeValueInterface!] | Custom attributes that are visible on the storefront
`order_item` | [OrderItemInterface!](/src/pages/graphql/schema/orders/interfaces/order-item.md) | Provides access to the product being returned, including information about selected and entered options
`quantity` | Float! | The quantity of the item the merchant authorized to be returned
`request_quantity` | Float! | The quantity of the item requested to be returned
Expand Down
23 changes: 16 additions & 7 deletions src/pages/graphql/schema/attributes/queries/attributes-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,28 +155,37 @@ The `CustomAttributeMetadataInterface` object contains the following attributes:

Attribute | Data Type | Description
--- |---| ---
`uid` | ID! | The unique ID of an attribute. Based on entity type and attribute code
`code` | String! | The unique identifier for an attribute code. This value should be in lowercase letters without spaces
`label` | String | The label assigned to the attribute
`code` | ID! | The unique identifier for an attribute code. This value should be in lowercase letters without spaces
`default_value` | String | Default attribute value
`entity_type` | AttributeEntityTypeEnum! | The type of entity that defines the attribute
`frontend_input` | AttributeFrontendInputEnum | The frontend input type of the attribute
`is_comparable` | Boolean | Whether a product or category attribute can be compared against another or not
`is_filterable` | Boolean | Whether a product or category attribute can be filtered or not
`is_filterable_in_search` | Boolean | Whether a product or category attribute can be filtered in search or not
`is_html_allowed_on_front` | Boolean | Whether a product or category attribute can use HTML on front or not
`is_required` | Boolean! | Whether the attribute value is required
`default_value` | String | Default attribute value
`is_searchable` | Boolean | Whether a product or category attribute can be searched or not
`is_unique` | Boolean! | Whether the attribute value must be unique
`is_used_for_price_rules` | Boolean | Whether a product or category attribute can be used for price rules or not
`is_used_for_promo_rules` | Boolean | Whether a product or category attribute is used for promo rules or not
`is_visible_in_advanced_search` | Boolean | Whether a product or category attribute is visible in advanced search or not
`is_visible_on_front` | Boolean | Whether a product or category attribute is visible on front or not
`is_wysiwyg_enabled` | Boolean | Whether a product or category attribute has WYSIWYG enabled or not
`label` | String | The label assigned to the attribute
`options` | [CustomAttributeOptionInterface!]! | Attribute options
`used_in_product_listing` | Boolean | Whether a product or category attribute is used in product listing or not

The `CustomAttributeOptionInterface` object contains the following attributes:

Attribute | Data Type | Description
--- |---| ---
`uid` | ID! | The unique ID of an attribute option
`is_default` | Boolean | Is the option value default
`label` | String! | The label assigned to the attribute option
`value` | String! | The attribute option value
`is_default` | Boolean | Is the option value default

The `AttributeMetadataError` object contains the following attributes:

Attribute | Data Type | Description
--- | --- | ---
`type` | AttributeMetadataErrorType! | Attribute metadata retrieval error type
`message` | String! | Attribute metadata retrieval error message
`type` | AttributeMetadataErrorType! | Attribute metadata retrieval error type
Loading

0 comments on commit d58aea6

Please sign in to comment.