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

GraphQL: add the option_id parameter for customizable options #3851

Merged
merged 2 commits into from
Mar 1, 2019
Merged
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions guides/v2.3/graphql/reference/customizable-option-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Magento has not implemented all possible customizable product options for GraphQ

Field | Type | Description
--- | --- | ---
`option_id` | Int | The ID assigned to the option
`required` | Boolean | Indicates whether the option is required
`sort_order` | Int | The order in which the option is displayed
`title` | String | The display name for this option
Expand Down Expand Up @@ -147,3 +148,27 @@ Field | Type | Description
`sku` | String | The Stock Keeping Unit for this option
`sort_order` | Int | The order in which the option is displayed
`title` | String | The display name for this option

## Example usage

The following query returns information about the customizable options configured for the product with a `sku` of `xyz`.

```text
products(filter: {sku: {eq: "xyz"}}) {
items {
id
name
sku
type_id
... on CustomizableProductInterface {
options {
title
required
sort_order
option_id
}
}
}
}
}
```