DeliveryTime
Delivery time information with minimum and maximum durations expressed in days, weeks, and years. This object type provides a structured way to represent delivery time ranges for products or variants.
Type Definition
type DeliveryTime {
minDays: Int!
minWeeks: Float!
minYears: Float!
maxDays: Int!
maxWeeks: Float!
maxYears: Float!
}
Fields
Field | Type | Description | Nullable | Relationship |
---|---|---|---|---|
minDays | Int! | Minimum delivery time in days. | No | Scalar (Int) |
minWeeks | Float! | Minimum delivery time in weeks. | No | Scalar (Float) |
minYears | Float! | Minimum delivery time in years. | No | Scalar (Float) |
maxDays | Int! | Maximum delivery time in days. | No | Scalar (Int) |
maxWeeks | Float! | Maximum delivery time in weeks. | No | Scalar (Float) |
maxYears | Float! | Maximum delivery time in years. | No | Scalar (Float) |
Relationships
-
Used by:
ProductVariant.deliveryTime
TheDeliveryTime
object is linked to product variants, providing delivery duration details for each variant. -
Scalar Types:
All fields use scalar types (Int
andFloat
) to represent numeric values for delivery durations.
Usage Examples
Basic Query
query {
productVariant(id: 12345) {
deliveryTime {
minDays
maxDays
}
}
}
Field Selection
query {
productVariant(id: 12345) {
deliveryTime {
minDays
minWeeks
minYears
maxDays
maxWeeks
maxYears
}
}
}
Nested Queries
query {
productVariant(id: 12345) {
id
title
deliveryTime {
minDays
maxDays
}
}
}
Filtering and Sorting
The DeliveryTime
object itself does not support filtering or sorting directly. However, you can filter or sort product variants based on delivery time fields if supported by the parent query.
Example filtering product variants with a minimum delivery time less than or equal to 5 days (assuming the parent query supports such filters):
query {
productVariants(filter: { deliveryTime_minDays_lte: 5 }, sort: { deliveryTime_minDays: ASC }) {
edges {
node {
id
deliveryTime {
minDays
maxDays
}
}
}
}
}
Note: Confirm filtering and sorting capabilities with your API schema.
Implements
This type does not implement any interfaces.
Connections
The DeliveryTime
object is a nested object type and does not have connection fields or pagination.
Related Types
Int!
— Used for day-based delivery time fields.Float!
— Used for week- and year-based delivery time fields.
Best Practices
- Always request both minimum and maximum fields to provide a complete delivery time range.
- Use the most appropriate unit (days, weeks, or years) depending on your UI or business logic needs.
- When displaying delivery times, consider converting weeks and years into days or vice versa for consistency.
- Cache delivery time data where possible to reduce repeated queries, as delivery times typically change infrequently.
Notes
- All fields are non-nullable and guaranteed to return valid numeric values.
- This object type is designed for read-only delivery time information; it does not support mutations.
- The API currently requires no authentication, but this may change in future versions. Plan accordingly for authentication handling.
- Use error handling in your queries to gracefully manage cases where a
ProductVariant
or itsdeliveryTime
may not be available.
If you have any questions or need further examples, please refer to the API schema or contact support.