Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta2: Different tasks from Custom product EAV in GraphQL epic (LYNX-52) #151

Merged
merged 23 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4d9e3d9
Example for retrieving rma_item attributes list
loginesta May 29, 2023
998e18e
Remove duplicated useless section
loginesta May 29, 2023
70f5ef1
Add example for ReturnItemAttributeMetadata
loginesta May 29, 2023
176993b
Refactor: rephrase
loginesta May 29, 2023
43a5066
Merge branch '2.4.7-develop' into LYNX-104
loginesta May 31, 2023
a1c492d
Merge branch '2.4.7-develop' into LYNX-104
jeff-matthews Jun 28, 2023
d4e11d7
Merge branch '2.4.7-develop' of github.com:AdobeDocs/commerce-webapi …
loginesta Jul 11, 2023
aae5bc3
Merge branch 'LYNX-104' of github.com:loginesta/commerce-webapi into …
loginesta Jul 11, 2023
68cbeea
Add examples for catalog_product and catalog_product with swatch options
loginesta Jul 13, 2023
6322da8
Merge branch '2.4.7-develop' of github.com:AdobeDocs/commerce-webapi …
loginesta Jul 14, 2023
6597387
LYNX-167: Removed UID and put code as ID type
svera Jul 14, 2023
131576e
LYNX-183: Add filters to attributesList query
loginesta Jul 17, 2023
373992b
Merge branch 'LYNX-104' of github.com:loginesta/commerce-webapi into …
svera Jul 18, 2023
353888d
LYNX-187: prefix, sufix, middlename and fax fields missing in setShip…
bl4de Jul 19, 2023
9e5e9d2
Merge branch 'LYNX-187' into LYNX-104
bl4de Jul 19, 2023
e2e44b7
Fix styling
loginesta Jul 19, 2023
f725083
Add deprecated message for PWA
loginesta Jul 24, 2023
d7b5134
Add all fields for attribute value interface and attribute metadata e…
loginesta Jul 24, 2023
70524a3
Custom_attributesV2 for products
loginesta Jul 24, 2023
1f2bd73
Filtering Product custom_attributes
loginesta Jul 25, 2023
59b1855
Address comments from PR
loginesta Jul 27, 2023
93e5643
Remove incorrect usage of attributes when filtering
loginesta Jul 27, 2023
859101c
Add missing deprecated message
loginesta Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link here goes to customer address attributes, it should link to customer attributes instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually the link goes nowhere since this doesn't not exist on the page which you currently are

`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
loginesta marked this conversation as resolved.
Show resolved Hide resolved
`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