Skip to Content

FilterValue

Describes a filter value used to refine product listings or search results by providing count, label, parameter name, and an optional taxonomy value.

Type Definition

type FilterValue { count: Int label: String paramName: String taxonomyValue: ProductTaxonomyValue }

Fields

FieldTypeNullableDescriptionRelationship
countIntYesThe number of results matching this filter value.None
labelStringYesThe display label for this filter value.None
paramNameStringYesThe value associated with this filter option.None
taxonomyValueProductTaxonomyValueYesThe related taxonomy value for this filter value.Links to ProductTaxonomyValue

Relationships

  • taxonomyValue: Connects to the ProductTaxonomyValue object type, providing additional structured taxonomy data related to this filter value. This relationship enables traversing from a filter value to its taxonomy metadata for richer filtering capabilities.

Usage Examples

Basic Query

{ filterValue { count label paramName } }

Field Selection

{ filterValue { label paramName } }

Nested Queries

{ filterValue { label taxonomyValue { id name description } } }

Filtering and Sorting

Filtering and sorting are typically applied at the query level when requesting lists of filter values. For example, you might filter filter values by label or sort by count in your query arguments (if supported by the API). Since FilterValue itself does not define arguments for filtering or sorting, these operations depend on the parent query or connection.

Example (hypothetical parent query usage):

{ filters(filterBy: { label_contains: "Red" }, sortBy: COUNT_DESC) { maxValue { label count } } }

Implements

This type does not implement any interfaces.

Connections

FilterValue is used as a field type in other objects such as Filter.maxValue and Filter.minValue. It does not define connection fields itself.

  • ProductTaxonomyValue: Represents taxonomy metadata related to a filter value, allowing for hierarchical or categorized filtering.

Best Practices

  • Use the count field to display how many products or results match a given filter value, improving user experience by showing filter impact.
  • Utilize the paramName field to pass filter parameters in queries or URLs for consistent filtering behavior.
  • When available, leverage the taxonomyValue relationship to provide richer filter context or to build nested filter UIs.
  • Always check for nullability on optional fields to avoid runtime errors in your client applications.

Notes

  • The API currently requires no authentication, but this may change in future versions.
  • Since all fields are optional, clients should implement null checks when accessing FilterValue fields.
  • Performance considerations: Avoid requesting deeply nested taxonomyValue fields unless necessary, as this may increase query complexity and response time.
  • No computed or derived fields are defined on FilterValue.
  • No field arguments are defined on FilterValue fields.
Last updated on