PreviousPrice
A previous price record for a product variant.
Type Definition
type PreviousPrice {
price: Float
netPrice: Float
updatedAt: String
}Fields
| Field | Type | Nullable | Description | Relationships |
|---|---|---|---|---|
| price | Float | Yes | The previous price value. | None |
| netPrice | Float | Yes | The previous net price value. | None |
| updatedAt | String | Yes | The date and time when this price was last updated (RFC 2822 format). | None |
Relationships
- Used by:
PreviousPriceEdge.node— as the node object in a connection edgeProductVariant.previousLowerPrice— as a field representing the previous lower price of a product variant
This type does not have direct relationships to other object types but is embedded within other types to represent historical pricing data.
Usage Examples
Basic Query
{
previousPrice {
price
netPrice
updatedAt
}
}Field Selection
{
previousPrice {
price
updatedAt
}
}Nested Queries
{
productVariant(id: 12345) {
id
previousLowerPrice {
price
netPrice
updatedAt
}
}
}Filtering and Sorting
The PreviousPrice object itself does not support filtering or sorting directly. Filtering and sorting should be applied on the parent types such as ProductVariant or connection edges that include PreviousPrice.
Implements
This type does not implement any interfaces.
Connections
PreviousPrice is used as the node type in the PreviousPriceEdge connection, enabling pagination and traversal of previous price records when querying lists of historical prices.
Related Types
ProductVariant— contains thepreviousLowerPricefield of typePreviousPricePreviousPriceEdge— connection edge containingPreviousPricenodes
Best Practices
- When querying previous prices, select only the fields you need (
price,netPrice,updatedAt) to optimize response size. - Use the
updatedAtfield to determine the recency of the price data. - Combine queries for
PreviousPricewithProductVariantqueries to contextualize pricing history. - Since all fields are optional, always implement null checks in your client code to handle missing data gracefully.
Notes
- The
updatedAtfield follows RFC 2822 date format; ensure your client parses this format correctly. - This API currently requires no authentication, but this may change in future versions. Plan your integration accordingly.
PreviousPricefields are scalar and do not trigger additional nested queries, so querying them is performant.- There are no computed or derived fields within
PreviousPrice; all data is returned as stored. - No field arguments are defined for
PreviousPrice.
Use the endpoint https://www.mystoreurl.com/graphql/0.8.0 for all queries involving PreviousPrice.
Last updated on