Skip to Content

PreviousPrice

A previous price record for a product variant.

Type Definition

type PreviousPrice { price: Float netPrice: Float updatedAt: String }

Fields

FieldTypeNullableDescriptionRelationships
priceFloatYesThe previous price value.None
netPriceFloatYesThe previous net price value.None
updatedAtStringYesThe 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 edge
    • ProductVariant.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.

  • ProductVariant — contains the previousLowerPrice field of type PreviousPrice
  • PreviousPriceEdge — connection edge containing PreviousPrice nodes

Best Practices

  • When querying previous prices, select only the fields you need (price, netPrice, updatedAt) to optimize response size.
  • Use the updatedAt field to determine the recency of the price data.
  • Combine queries for PreviousPrice with ProductVariant queries to contextualize pricing history.
  • Since all fields are optional, always implement null checks in your client code to handle missing data gracefully.

Notes

  • The updatedAt field 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.
  • PreviousPrice fields 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