Advanced Search

Advanced Search with searchCustom

The searchCustom filter provides advanced search capabilities with additional searchable fields and the ability to expand results to include related records.

Input Structure

The searchCustom filter accepts an INPUT_OBJECT with the following fields:

How it works

  1. Search Phase: The terms are searched across default searchable fields PLUS any fields specified in include
  2. Extension Phase: For each matching record, if extend is provided, follow the field references to include related records in the results

Key behaviors

Usage Patterns

Basic search

Searches default searchable fields:

query {
  collectionViewConnection(
    first: 10
    searchCustom: {
      terms: "red widget"
    }
  ) {
    edges {
      node {
        collectionId
      }
    }
  }
}

Include additional fields in search

query {
  collectionViewConnection(
    first: 10
    searchCustom: {
      terms: "acme"
      include: ["customField1", "customField2"]
    }
  ) {
    edges {
      node {
        collectionId
      }
    }
  }
}

Expand results to include related records

query {
  collectionViewConnection(
    first: 10
    searchCustom: {
      terms: "urgent"
      extend: ["relatedRecordUrl"]
    }
  ) {
    edges {
      node {
        collectionId
      }
    }
  }
}

Combine include and extend

query {
  collectionViewConnection(
    first: 10
    searchCustom: {
      terms: "acme corp"
      include: ["customField1"]
      extend: ["relatedRecordUrl"]
    }
  ) {
    edges {
      node {
        collectionId
      }
    }
  }
}