Documentation Center

GraphQL samples for displaying facets to the visitor

Use the taxonomy query to fetch facets to display as a drill-down filtering interface to your visitors.

The following query returns the top 5 top-level facets and the top 5 narrower subfacets within those:
{
  taxonomy(connectorId: "poolparty", language: "english") {
    totalCount
    edges {
      node {
        connectorId
        uri
        title
        language
        topConcepts(first: 5) {
          edges {
            node {
              id
              preferredLabel
              narrowerConcepts(first: 5) {
              }
                edges {
                  node {
                    id
                    preferredLabel
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}