Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt

Use this file to discover all available pages before exploring further.

The SavedSearch type represents stored search configurations that can be executed to retrieve content or assets.

Type Definition

type SavedSearch {
  id: ID!
  name: String!
  description: String
  type: SavedSearchType!
}

Fields

FieldTypeDescription
idID!Unique identifier
nameString!Search name
descriptionStringOptional description
typeSavedSearchType!Search type (CONTENT or ASSET)

SavedSearchType Enum

enum SavedSearchType {
  CONTENT
  ASSET
}
ValueDescription
CONTENTSearch returns content items
ASSETSearch returns asset items

Example Queries

List Saved Searches

query GetSavedSearches($type: SavedSearchType, $cursor: String) {
  savedSearches(type: $type, cursor: $cursor, limit: 20) {
    data {
      id
      name
      description
      type
    }
    pagination {
      cursor
      hasMore
      limit
    }
  }
}
query GetSavedSearch($id: ID!) {
  savedSearch(id: $id) {
    id
    name
    description
    type
  }
}
Response:
{
  "data": {
    "savedSearch": {
      "id": "ss123",
      "name": "Recent Tutorials",
      "description": "Tutorials updated in the last 30 days",
      "type": "CONTENT"
    }
  }
}
query ExecuteSavedSearch($id: ID!, $cursor: String) {
  executeSavedSearch(id: $id, cursor: $cursor, limit: 20) {
    ... on ContentList {
      data {
        id
        name
        tags
      }
      pagination {
        cursor
        hasMore
        limit
      }
    }
    ... on AssetList {
      data {
        id
        name
        url
      }
      pagination {
        cursor
        hasMore
        limit
      }
    }
  }
}

SavedSearchResult Union

The executeSavedSearch query returns a union type:
union SavedSearchResult = ContentList | AssetList
Use inline fragments to handle each result type:
... on ContentList {
  data { id name }
}
... on AssetList {
  data { id url }
}
  • Content - Content items returned by CONTENT searches
  • Asset - Assets returned by ASSET searches