Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

GraphQL: Deprecate id attributes in favor of uids #8273

Merged
merged 12 commits into from
Dec 22, 2020
6 changes: 5 additions & 1 deletion src/_data/toc/graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ pages:
- label: CategoryInterface attributes
url: /graphql/interfaces/category-interface.html

- label: CustomizableOptionInterface
- label: CustomizableOptionInterface attributes
url: /graphql/interfaces/customizable-option-interface.html

- label: Bundle product data types
Expand All @@ -485,6 +485,10 @@ pages:
- label: Virtual product data types
url: /graphql/interfaces/virtual-product.html

- label: CartItemInterface attributes and implementations
url: /graphql/interfaces/cart-item-interface.html
exclude_versions: ["2.3"]

- label: CreditMemoItemInterface attributes and implementations
url: /graphql/interfaces/credit-memo-item-interface.html
exclude_versions: ["2.3"]
Expand Down
7 changes: 7 additions & 0 deletions src/_includes/graphql/cart-item-input-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Attribute | Data Type | Description
--- | --- | ---
`entered_options` | [EnteredOptionInput!] | An array of entered options for the base product, such as personalization text
`parent_sku` | String | For child products, the SKU of its parent product
`quantity` | Float! | The quantity of the item to add to the cart
`selected_options` | [ID!] | The selected options for the base product, such as color or size, using the unique ID for a customizable or configurable object such as `CustomizableRadioOption`, `CustomizableDropDownOption`, or `ConfigurableProductOptionsValues`
`sku` | String! | The sku of the product to be added to the cart
2 changes: 1 addition & 1 deletion src/_includes/graphql/cart-object-24.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Attribute | Data Type | Description
`gift_message` | [GiftMessage][GiftMessage] | A gift message added to the cart
`gift_receipt_included` | Boolean! | Indicates if the customer requested a gift receipt for the cart
`gift_wrapping` | GiftWrapping | The selected gift wrapping for the cart
`id` | ID! | The ID of the cart
`id` | ID! | The unique ID of the cart
`is_virtual` | Boolean! | Indicates whether the cart contains only virtual products
`items` | [[CartItemInterface]][CartItemInterface] | Contains the items in the customer's cart
`prices` | [CartPrices][CartPrices] | Contains subtotals and totals
Expand Down
5 changes: 3 additions & 2 deletions src/_includes/graphql/category-filter-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ The `CategoryFilterInput` object defines the filters to be used in this query.

Attribute | Data type | Description
--- | --- | ---
`ids` | FilterEqualTypeInput | Filters by the specified category IDs
`category_uid` | FilterEqualTypeInput | "Filters by the unique category ID for a `CategoryInterface` object
`ids` | FilterEqualTypeInput | Deprecated. Use `category_uid` instead. Filters by the specified category IDs
`name` | FilterMatchTypeInput | Filters by the display name of the category
`parent_id` | FilterEqualTypeInput | Filters by parent category ID
`parent_id` | FilterEqualTypeInput | "Filters by the unique parent category ID for a `CategoryInterface` object
`url_key` | FilterEqualTypeInput | Filters by the part of the URL that identifies the category
`url_path` | FilterEqualTypeInput | Filters by the URL path for the category

Expand Down
12 changes: 6 additions & 6 deletions src/_includes/graphql/customer-orders-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Attribute | Data type | Description
`gift_message` | [GiftMessage](#GiftMessage) | The entered gift message for the order
`gift_receipt_included` | Boolean! | Indicates if the customer requested a gift receipt for the order
`gift_wrapping` | [GiftWrapping](#GiftWrapping) | The selected gift wrapping for the order
`id` | ID! | Unique identifier for the order
`id` | ID! | The unique ID for a `CustomerOrder` object
`increment_id` | String | Deprecated. Use the `id` attribute instead
`invoices` | [[Invoice](#Invoice)]! | Contains a list of invoices for the order
`items` | [[OrderItemInterface](#OrderItemInterface)] | An array containing the items purchased in this order
Expand All @@ -74,7 +74,7 @@ The `CreditMemo` object contains details about credit memos applied to an order.
Attribute | Data type | Description
--- | --- | ---
`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the credit memo
`id` | ID! | The unique ID of the credit memo
`id` | ID! | The unique ID of the `CreditMemo` object
`items` | [[CreditMemoItemInterface](#CreditMemoItemInterface)] | An array containing details about refunded items
`number` | String! | The sequential credit memo number
`total` | [CreditMemoTotal](#CreditMemoTotal) | Contains details about the total refunded amount
Expand Down Expand Up @@ -127,7 +127,7 @@ The `Invoice` object provides details about a customer invoice.
Attribute | Data type | Description
--- | --- | ---
`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the invoice
`id` | ID! | The internal ID of the invoice
`id` | ID! | The internal ID of the `Invoice` object
`items` | [[InvoiceItemInterface](#InvoiceItemInterface)]! | Contains details about invoiced products
`number` | String! | The sequential number of the invoice
`total` | [InvoiceTotal](#InvoiceTotal)! | Invoice total amount details
Expand Down Expand Up @@ -163,15 +163,15 @@ The ItemSelectedBundleOption object contains a list of bundle options that are a

Attribute | Data type | Description
--- | --- | ---
`id` | ID! | The unique identifier of the option
`id` | ID! | The unique identifier of the ItemSelectedBundleOption object
`label` | String! | The label of the option
`values` | [[ItemSelectedBundleOptionValue!](#ItemSelectedBundleOptionValue)]! | A list of products that represent the values of the parent option

#### ItemSelectedBundleOptionValue attributes {#ItemSelectedBundleOptionValue}

Attribute | Data type | Description
--- | --- | ---
`id` | ID! | The unique identifier of the option
`id` | ID! | The unique identifier of the ItemSelectedBundleOptionValue object
`price` | Money! | The price of the child bundle product
`product_name` | String! | The name of the child bundle product
`product_sku` | String! | The SKU of the child bundle product
Expand Down Expand Up @@ -228,7 +228,7 @@ Attribute | Data type | Description
Attribute | Data type | Description
--- | --- | ---
`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments added to the shipment
`id` | ID! | The unique ID of the shipment
`id` | ID! | The unique ID of the OrderShipment object
`items` | [[ShipmentItemInterface](#ShipmentItemInterface)] | Contains items included in the shipment
`number` | String! | The sequential credit shipment number
`tracking` | [[ShipmentTracking](#ShipmentTracking)] | Contains shipment tracking detail
Expand Down
4 changes: 4 additions & 0 deletions src/_includes/graphql/customizable-option-input-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Attribute | Data Type | Description
--- | --- | ---
`id` | Int | A unique ID assigned to the customizable option
`value_string` | String! | A value assigned to the customizable option
2 changes: 1 addition & 1 deletion src/_includes/graphql/downloadable-items-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Attribute | Data type | Description
--- | --- | ---
`sort_order` | Int | A number indicating the sort order
`title`| String | The display name of the link
`uid` | ID! | A string that encodes option details
`uid` | ID! | The unique ID for a `DownloadableItemsLinks` object
2 changes: 1 addition & 1 deletion src/_includes/graphql/entered-option-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ The `EnteredOptionInput` object must contain the following attributes.

Attribute | Data Type | Description
--- | --- | ---
`uid` | ID! | An encoded ID
`uid` | ID! | The unique ID for a specific `CustomizableOptionInterface` object, such as a `CustomizableFieldOption`, `CustomizableFileOption`, or `CustomizableAreaOption` object
`value` | String! | Text the customer entered
3 changes: 2 additions & 1 deletion src/_includes/graphql/gift-wrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ The `GiftWrapping` object can contain the following attributes.
Attribute | Data Type | Description
--- | --- | ---
`design` | String! | The name of the gift wrapping design
`id` | ID! | The unique identifier for the gift wrapping option
`id` | ID! | Deprecated. Use `uid` instead. The unique identifier for the gift wrapping option
`image` | [GiftWrappingImage](#GiftWrappingImage) | The preview image for the gift wrapping option
`price` | Money! | The price of the gift wrapping option
`uid` | ID! | The unique identifier for the `GiftWrapping` object

### GiftWrappingImage object {#GiftWrappingImage}

Expand Down
80 changes: 80 additions & 0 deletions src/_includes/graphql/grouped-product-sample-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
```graphql
{
products(filter:
{sku: {eq: "24-WG085_Group"}}
)
{
items {
uid
name
sku
__typename
... on GroupedProduct {
items{
qty
position
product{
sku
name
__typename
url_key
}
}
}
}
}
}
```

{% collapsible Response %}

```json
{
"data": {
"products": {
"items": [
{
"uid": "NDU=",
"name": "Set of Sprite Yoga Straps",
"sku": "24-WG085_Group",
"__typename": "GroupedProduct",
"items": [
{
"qty": 0,
"position": 0,
"product": {
"sku": "24-WG085",
"name": "Sprite Yoga Strap 6 foot",
"__typename": "SimpleProduct",
"url_key": "sprite-yoga-strap-6-foot"
}
},
{
"qty": 0,
"position": 1,
"product": {
"sku": "24-WG086",
"name": "Sprite Yoga Strap 8 foot",
"__typename": "SimpleProduct",
"url_key": "sprite-yoga-strap-8-foot"
}
},
{
"qty": 0,
"position": 2,
"product": {
"sku": "24-WG087",
"name": "Sprite Yoga Strap 10 foot",
"__typename": "SimpleProduct",
"url_key": "sprite-yoga-strap-10-foot"
}
}
]
}
]
}
}
}
```

{% endcollapsible %}
6 changes: 4 additions & 2 deletions src/_includes/graphql/item-selected-bundle-option.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ The ItemSelectedBundleOption object contains a list of bundle options that are a

Attribute | Data type | Description
--- | --- | ---
`id` | ID! | The unique identifier of the option
`id` | ID! | Deprecated. Use `uid` instead. The unique identifier of the option
`label` | String! | The label of the option
`uid` | ID! | The unique ID for a `ItemSelectedBundleOption` object
`values` | [[ItemSelectedBundleOptionValue](#ItemSelectedBundleOptionValue)] | A list of products that represent the values of the parent option

#### ItemSelectedBundleOptionValue attributes {#ItemSelectedBundleOptionValue}

Attribute | Data type | Description
--- | --- | ---
`id` | ID! | The unique identifier of the option
`id` | ID! | Deprecated. Use `uid` instead. The unique identifier of the option
`price` | Money! | The price of the child bundle product
`product_name` | String! | The name of the child bundle product
`product_sku` | String! | The SKU of the child bundle product
`quantity` | Float! | Indicates how many of this bundle product were ordered
`uid` | ID! | The unique identifier of the option
3 changes: 2 additions & 1 deletion src/_includes/graphql/store-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ Attribute | Data Type | Description | Default or example value
`product_reviews_enabled` | String | Indicates whether product reviews are enabled. Possible values: 1 (Yes) and 0 (No) | 1
`product_url_suffix` | String | The suffix applied to product pages, such as `.htm` or `.html` | `.html`
`required_character_classes_number` | String | The number of different character classes required in a password (lowercase, uppercase, digits, special characters). <br/>Configuration path: customer/password/required_character_classes_number | 2
`root_category_id` | Int | The ID of the root category | 2
`root_category_id` | Int | Deprecated. Use `root_category_uid` instead. The ID of the root category | 2
`root_category_uid` | Int | The unique ID for the root category object implementing `CategoryInterface` | 2
`sales_fixed_product_tax_display_setting` | [FixedProductTaxDisplaySettings](#FixedProductTaxDisplaySettings) | Corresponds to the **Display Prices In Sales Modules** field. It indicates how Fixed Product Taxes information is displayed on cart, checkout, and order pages | FPT_DISABLED
`sales_gift_wrapping` | String | Indicates if gift wrapping prices are displayed on the Orders page. Possible values: 1 (Yes) and 0 (No) | 1
`sales_printed_card` | String | Indicates if printed card prices are displayed on the Orders page. Possible values: 1 (Yes) and 0 (No) | 1
Expand Down
Loading