Skip to main content

List Saved Searches

Fetch a paginated list of saved searches, optionally filtered by type.
query GetSavedSearches($type: SavedSearchType, $page: Int, $limit: Int) {
  savedSearches(type: $type, page: $page, limit: $limit) {
    data {
      id
      name
      description
      type
    }
    pagination {
      page
      limit
      total
      pages
    }
  }
}

Parameters

ParameterTypeDefaultDescription
typeSavedSearchType-Filter by search type (CONTENT or ASSET)
pageInt1Page number
limitInt20Items per page

Example

query {
  savedSearches(type: CONTENT, page: 1, limit: 10) {
    data {
      id
      name
      description
      type
    }
    pagination {
      total
    }
  }
}
Response:
{
  "data": {
    "savedSearches": {
      "data": [
        {
          "id": "ss123",
          "name": "Recent Tutorials",
          "description": "Tutorials updated in the last 30 days",
          "type": "CONTENT"
        },
        {
          "id": "ss124",
          "name": "Published Articles",
          "description": "All published blog articles",
          "type": "CONTENT"
        }
      ],
      "pagination": {
        "total": 2
      }
    }
  }
}
Fetch a specific saved search by ID.
query GetSavedSearch($id: ID!) {
  savedSearch(id: $id) {
    id
    name
    description
    type
  }
}

Parameters

ParameterTypeRequiredDescription
idID!YesSaved search ID
Run a saved search and get paginated results.
query ExecuteSavedSearch($id: ID!, $page: Int, $limit: Int) {
  executeSavedSearch(id: $id, page: $page, limit: $limit) {
    ... on ContentList {
      data {
        id
        name
        tags
        compiled
      }
      pagination {
        page
        limit
        total
        pages
      }
    }
    ... on AssetList {
      data {
        id
        name
        type
        url
      }
      pagination {
        page
        limit
        total
        pages
      }
    }
  }
}

Parameters

ParameterTypeRequiredDescription
idID!YesSaved search ID
pageIntNoPage number (default: 1)
limitIntNoItems per page (default: 20)

Example

query {
  executeSavedSearch(id: "ss123", page: 1, limit: 10) {
    ... on ContentList {
      data {
        id
        name
        tags
      }
      pagination {
        total
        pages
      }
    }
  }
}
Response:
{
  "data": {
    "executeSavedSearch": {
      "data": [
        {
          "id": "cont456",
          "name": "Getting Started Guide",
          "tags": ["tutorial", "beginner"]
        },
        {
          "id": "cont457",
          "name": "Advanced Patterns",
          "tags": ["tutorial", "advanced"]
        }
      ],
      "pagination": {
        "total": 5,
        "pages": 1
      }
    }
  }
}

Saved Search Fields

FieldTypeDescription
idID!Unique identifier
nameString!Search name
descriptionStringSearch description
typeSavedSearchType!CONTENT or ASSET

SavedSearchType Enum

ValueDescription
CONTENTSearch returns content items
ASSETSearch returns asset items
The executeSavedSearch query returns a union type. Use inline fragments (... on ContentList or ... on AssetList) to access the appropriate fields based on the saved search type.