Skip to main content

Search Behavior

info

Learn about the search feature

Unchained allows you to search and filter products and assortments.

There are two ways to search for products in Unchained:

  1. General Search: Search all products in your system.

    query searchProducts($queryString: String, $limit: Int) {
    searchProducts(queryString: $queryString, includeInactive: true) {
    products {
    _id
    status
    texts {
    _id
    title
    description
    }
    media(limit: $limit) {
    texts {
    _id
    title
    }
    file {
    _id
    url
    name
    }
    }
    }
    }
    }

    Options include orderBy, includeInactive, and assortmentId.

  2. Assortment Search: Search products attached to a specific assortment.

    query Assortment($assortmentId: ID) {
    assortment(assortmentId: $assortmentId) {
    searchProducts {
    filteredProducts
    filters {
    filteredProducts
    definition {
    _id
    }
    isSelected
    options {
    filteredProducts
    definition {
    _id
    }
    isSelected
    }
    }
    products {
    _id
    }
    }
    }
    }

Similar to the general product search, you can search for assortments:

query searchAssortments($queryString: String) {
searchAssortments(queryString: $queryString, includeInactive: true) {
assortments {
_id
isActive
texts {
_id
title
description
}
}
}
}