CustomizationGroupOption
Represents a selectable option within a product customization group.
Type Definition
type CustomizationGroupOption {
id: String
title: String
originalNetPrice: Float
originalPrice: Float
netPrice: Float
price: Float
image: String
tax: Float
group: CustomizationGroup
childGroup: CustomizationGroup
inventoryManagement: String
stock: Boolean
stockAlarm: Boolean
maxLength: Int
minLength: Int
rows: Int
}
Fields
Field | Type | Nullable | Description | Related Type |
---|---|---|---|---|
id | String | Yes | Returns the unique identifier for this option. | — |
title | String | Yes | The display name of this option. | — |
originalNetPrice | Float | Yes | The net price of this option before discounts. | — |
originalPrice | Float | Yes | The price of this option before discounts. | — |
netPrice | Float | Yes | The net price of this option after discounts. | — |
price | Float | Yes | The price of this option after discounts. | — |
image | String | Yes | The image associated with this option. | — |
tax | Float | Yes | The tax amount for this option. | — |
group | CustomizationGroup | Yes | The customization group this option belongs to. | CustomizationGroup |
childGroup | CustomizationGroup | Yes | The child customization group for this option. | CustomizationGroup |
inventoryManagement | String | Yes | The inventory management system for this option, or null if not managed. | — |
stock | Boolean | Yes | Indicates if this option is in stock. | — |
stockAlarm | Boolean | Yes | Indicates if this option is low on stock. | — |
maxLength | Int | Yes | The maximum allowed length for textarea input, if applicable. | — |
minLength | Int | Yes | The minimum allowed length for textarea input, if applicable. | — |
rows | Int | Yes | The number of rows for textarea input, if applicable. | — |
Relationships
- group: Links this option to the parent
CustomizationGroup
it belongs to, allowing traversal from an option to its group. - childGroup: Represents a nested or dependent
CustomizationGroup
related to this option, enabling hierarchical customization structures.
These relationships allow clients to navigate from an option to its associated customization groups to retrieve additional context or nested options.
Usage Examples
Basic Query
Fetch basic details of a customization group option by selecting its ID, title, and pricing information.
{
customizationGroupOption(id: "option123") {
id
title
originalPrice
price
netPrice
}
}
Field Selection
Retrieve detailed information including stock status, inventory management, and textarea input constraints.
{
customizationGroupOption(id: "option123") {
id
title
stock
stockAlarm
inventoryManagement
maxLength
minLength
rows
}
}
Nested Queries
Access the parent customization group and any child group associated with this option.
{
customizationGroupOption(id: "option123") {
id
title
group {
id
title
}
childGroup {
id
title
}
}
}
Filtering and Sorting
Assuming a query that returns multiple options, filter options that are in stock and sort them by price ascending.
{
customizationGroupOptions(filter: { stock: true }, sort: { price: ASC }) {
id
title
price
stock
}
}
Note: The exact query structure for filtering and sorting depends on the API schema exposing lists of CustomizationGroupOption
. Adjust accordingly.
Implements
This type does not explicitly implement any interfaces.
Connections
No connection fields are defined on CustomizationGroupOption
in the current schema.
Related Types
- CustomizationGroup: Represents a group of customization options. The
group
andchildGroup
fields link to this type, enabling hierarchical customization structures.
Best Practices
- When querying options, select only the fields you need to optimize performance.
- Use the
stock
andstockAlarm
fields to manage inventory display logic in your UI. - Leverage the
group
andchildGroup
relationships to build dynamic customization flows. - Handle nullable fields gracefully, as many fields are optional and may return
null
. - Use filtering and sorting when querying multiple options to improve data relevance and user experience.
Notes
- All pricing fields (
originalPrice
,price
,originalNetPrice
,netPrice
) reflect values before and after discounts, enabling flexible pricing display. - The
image
field returns a URL string for the option’s image; ensure your client handles image loading and errors appropriately. - Inventory management may be
null
if not managed, so check this field before relying on stock data. - Textarea input constraints (
maxLength
,minLength
,rows
) help enforce user input validation on customization forms. - The API currently requires no authentication; however, this may change in future versions. Design your clients to handle authentication requirements gracefully when they arise.