Skip to Content

LoyaltyDiscountLevel

Represents a single level in the loyalty discount progress.

Type Definition

type LoyaltyDiscountLevel { threshold: Float! discount: Float! validUntil: String }

Fields

FieldTypeDescriptionNullableRelated Types
thresholdFloat!The threshold required for this level.NoFloat
discountFloat!The discount for this level.NoFloat
validUntilStringThe valid until date for this level (optional).YesString

Relationships

  • threshold and discount are scalar fields of type Float representing numeric values related to the loyalty discount level.
  • validUntil is an optional string field representing a date until which this discount level remains valid.

Usage Examples

Basic Query

{ loyaltyDiscountLevel { threshold discount validUntil } }

Field Selection

{ loyaltyDiscountLevel { threshold discount } }

Nested Queries

Since LoyaltyDiscountLevel contains only scalar fields, nested queries are not applicable.

Filtering and Sorting

Filtering and sorting can be applied in queries that return lists of LoyaltyDiscountLevel objects. For example:

{ loyaltyDiscountLevels(filter: { threshold_gte: 100 }, sort: DISCOUNT_DESC) { threshold discount validUntil } }

Note: The above filtering and sorting arguments depend on the parent query implementation and are shown here as an example pattern.

Implements

This type does not implement any interfaces.

Connections

No connection fields are defined on LoyaltyDiscountLevel.

  • Float — Used for numeric fields threshold and discount.
  • String — Used for the optional validUntil date field.

Best Practices

  • Always query for threshold and discount together to understand the discount level context.
  • Use the optional validUntil field to determine if a discount level is currently active.
  • When querying multiple levels, apply filtering and sorting on threshold or discount to optimize data retrieval.
  • Handle cases where validUntil may be null to avoid errors in date processing.

Notes

  • The API currently requires no authentication, but this may change in future versions.
  • threshold and discount are required fields and guaranteed to be present.
  • validUntil is optional and may be omitted if the discount level does not have an expiration date.
  • Since all fields are scalar, querying this type is performant and straightforward.
  • Consider caching loyalty discount levels on the client side if they do not change frequently to reduce API calls.
Last updated on