Type Reference
This page documents every type in the Trove GraphQL schema.
Scalars
Section titled “Scalars”| Scalar | Format | Example |
|---|---|---|
DateTime | ISO 8601 string | "2026-03-25T12:00:00Z" |
JSON | Arbitrary JSON value | { "key": "value" }, 42, [1, 2, 3] |
Output Types
Section titled “Output Types”SearchResults
Section titled “SearchResults”Container for search and discovery query results.
| Field | Type | Description |
|---|---|---|
results | [SearchResult!]! | Array of ranked search results. |
totalMatches | Int! | Total number of matching documents (may exceed the returned results). |
queryTimeMs | Int! | Time taken to execute the search in milliseconds. |
SearchResult
Section titled “SearchResult”A single search result with its document and relevance metadata.
| Field | Type | Description |
|---|---|---|
document | Document! | The matched document. |
snippet | String! | A text snippet showing the most relevant passage. |
relevanceScore | Float! | Similarity score between 0 and 1. Higher is more relevant. |
Document
Section titled “Document”A piece of content stored in your knowledge base.
| Field | Type | Nullable | Description |
|---|---|---|---|
id | ID! | No | Unique document identifier. |
connector | Connector! | No | The connector this document belongs to. |
externalId | String! | No | Identifier from the source system (e.g., tweet ID, article URL hash). |
title | String | Yes | Document title. |
url | String | Yes | Source URL. |
author | String | Yes | Document author. |
contentDate | DateTime | Yes | Original publication or creation date from the source. |
indexedAt | DateTime! | No | Timestamp when the document was indexed in Trove. |
previewText | String | Yes | First ~300 words of the document, stored in D1 for fast access. Use this for listings and summaries. |
fullText | String | Yes | Complete document text. Lazy-loaded from R2 storage on demand. Only request this field when you need the full content. |
wordCount | Int | Yes | Total word count of the document. |
contentType | String! | No | Content type label. One of: "text", "transcript", "highlight", "bookmark". |
tags | [String!]! | No | Array of tags applied to the document. |
metadata | JSON | Yes | Arbitrary metadata from the source system. |
createdAt | DateTime! | No | Timestamp when the document record was created. |
DocumentConnection
Section titled “DocumentConnection”Paginated document list returned by the documents query.
| Field | Type | Description |
|---|---|---|
nodes | [Document!]! | Array of documents in the current page. |
totalCount | Int! | Total number of documents matching the filters. |
hasMore | Boolean! | Whether more documents exist beyond the current page. |
Connector
Section titled “Connector”A configured data source that ingests documents into your knowledge base.
| Field | Type | Nullable | Description |
|---|---|---|---|
id | ID! | No | Unique connector identifier. |
connectorType | String! | No | Type of connector (e.g., "rss", "hacker-news", "podcast", "manual"). |
name | String! | No | Display name. |
description | String | Yes | Optional description. |
icon | String | Yes | Icon identifier or emoji. |
status | ConnectorStatus! | No | Current status: ACTIVE, PAUSED, ERROR, or SETUP. |
execution | ExecutionMode! | No | Execution mode: CLOUD or LOCAL. |
config | JSON | Yes | Connector configuration. Sensitive fields (API keys, tokens) are redacted and never returned. |
schedule | String | Yes | Schedule string for scheduled syncs (e.g., "every 6 hours", "daily"). |
cursor | String | Yes | Current sync cursor position. |
documentCount | Int! | No | Total number of documents from this connector. |
lastSyncedAt | DateTime | Yes | Timestamp of the last successful sync. |
nextSyncAt | DateTime | Yes | Timestamp of the next scheduled sync. |
errorMessage | String | Yes | Error message if the connector is in ERROR status. |
createdAt | DateTime! | No | Timestamp when the connector was created. |
updatedAt | DateTime! | No | Timestamp of the last update. |
recentDocuments | [Document!]! | No | Latest documents from this connector. Accepts limit argument (default 5). |
topAuthors | [AuthorStat!]! | No | Most prolific authors in this connector. Accepts limit argument (default 5). |
dateRange | DateRange | Yes | Earliest and latest document dates in this connector. |
syncRuns | [SyncRun!]! | No | Recent sync run history. Accepts limit argument (default 5). |
AuthorStat
Section titled “AuthorStat”Author frequency data for a connector.
| Field | Type | Description |
|---|---|---|
author | String! | Author name. |
documentCount | Int! | Number of documents by this author. |
DateRange
Section titled “DateRange”Date bounds for documents in a connector.
| Field | Type | Nullable | Description |
|---|---|---|---|
earliest | DateTime | Yes | Earliest document date. null if the connector has no dated documents. |
latest | DateTime | Yes | Latest document date. null if the connector has no dated documents. |
SyncRun
Section titled “SyncRun”A record of a connector sync execution.
| Field | Type | Nullable | Description |
|---|---|---|---|
id | ID! | No | Unique sync run identifier. |
connector | Connector! | No | The connector this sync run belongs to. |
status | SyncRunStatus! | No | Current status: RUNNING, SUCCESS, ERROR, or CANCELLED. |
source | ExecutionMode! | No | Whether this sync ran via CLOUD or LOCAL. |
documentsSynced | Int! | No | Number of documents indexed in this run. |
cursorBefore | String | Yes | Cursor position before the sync started. |
cursorAfter | String | Yes | Cursor position after the sync completed. |
errorMessage | String | Yes | Error message if the sync failed. |
startedAt | DateTime! | No | Timestamp when the sync started. |
completedAt | DateTime | Yes | Timestamp when the sync completed. null if still running. |
durationMs | Int | Yes | Total sync duration in milliseconds. null if still running. |
UserStats
Section titled “UserStats”Account-level statistics and aggregates.
| Field | Type | Description |
|---|---|---|
totalDocuments | Int! | Total number of documents across all connectors. |
totalConnectors | Int! | Total number of connectors. |
activeConnectors | Int! | Number of connectors with ACTIVE status. |
documentsByConnectorType | [ConnectorTypeStat!]! | Document count breakdown by connector type. |
documentsByContentType | [ContentTypeStat!]! | Document count breakdown by content type. |
recentSyncRuns | [SyncRun!]! | Recent sync runs across all connectors. Accepts limit argument (default 5). |
nextScheduledSync | Connector | The connector with the nearest upcoming scheduled sync, or null if no syncs are scheduled. |
ConnectorTypeStat
Section titled “ConnectorTypeStat”Document count for a specific connector type.
| Field | Type | Description |
|---|---|---|
connectorType | String! | The connector type (e.g., "rss", "hacker-news"). |
documentCount | Int! | Number of documents from connectors of this type. |
ContentTypeStat
Section titled “ContentTypeStat”Document count for a specific content type.
| Field | Type | Description |
|---|---|---|
contentType | String! | The content type (e.g., "text", "transcript"). |
documentCount | Int! | Number of documents with this content type. |
IngestResult
Section titled “IngestResult”Result of a batch document ingestion.
| Field | Type | Nullable | Description |
|---|---|---|---|
documentsIndexed | Int! | No | Number of documents successfully indexed. |
documentsSkipped | Int! | No | Number of documents skipped (already exist with the same externalId). |
cursor | String | Yes | Updated cursor position for the connector. |
errors | [IngestError!] | Yes | Array of per-document errors, if any. null when all documents succeed. |
IngestError
Section titled “IngestError”Error details for a single document that failed during ingestion.
| Field | Type | Description |
|---|---|---|
externalId | String! | The externalId of the document that failed. |
message | String! | Description of the error. |
Input Types
Section titled “Input Types”CreateConnectorInput
Section titled “CreateConnectorInput”Input for the createConnector mutation.
| Field | Type | Required | Description |
|---|---|---|---|
connectorType | String! | Yes | The type of connector (e.g., "rss", "hacker-news", "podcast"). |
name | String! | Yes | Display name for the connector. |
description | String | No | Optional description. |
icon | String | No | Icon identifier or emoji. |
execution | ExecutionMode! | Yes | CLOUD for server-side syncs, LOCAL for desktop app syncs. |
config | JSON! | Yes | Connector-specific configuration (feed URLs, credentials, etc.). |
schedule | String | No | Schedule string for scheduled syncs. Supported values: "every 30 minutes", "every hour", "every 6 hours", "every 12 hours", "daily". |
UpdateConnectorInput
Section titled “UpdateConnectorInput”Input for the updateConnector mutation. All fields are optional; only included fields are updated.
| Field | Type | Required | Description |
|---|---|---|---|
name | String | No | New display name. |
description | String | No | New description. |
config | JSON | No | Updated configuration. Replaces the entire config object. |
schedule | String | No | Updated schedule string. Supported values: "every 30 minutes", "every hour", "every 6 hours", "every 12 hours", "daily". |
SaveDocumentInput
Section titled “SaveDocumentInput”Input for the saveDocument mutation (quick save).
| Field | Type | Required | Description |
|---|---|---|---|
text | String | No | Text content to save. |
url | String | No | Source URL. |
title | String | No | Document title. |
source | String | No | Label for the save source (e.g., "clipboard", "share-extension"). |
tags | [String!] | No | Tags to apply. |
IngestDocumentInput
Section titled “IngestDocumentInput”Input for a single document in the ingestDocuments mutation.
| Field | Type | Required | Description |
|---|---|---|---|
externalId | String! | Yes | Unique identifier from the source system. Used for deduplication with connectorId. |
title | String | No | Document title. |
text | String | No | Full text content. Required unless audioUrl is provided. |
audioUrl | String | No | URL to an audio file for transcription via Workers AI. |
url | String | No | Source URL. |
author | String | No | Document author. |
date | DateTime | No | Original publication or creation date. |
contentType | String | No | Content type label. One of: "text", "transcript", "highlight", "bookmark". |
tags | [String!] | No | Tags to apply. |
metadata | JSON | No | Arbitrary metadata stored with the document. |
ConnectorStatus
Section titled “ConnectorStatus”The operational status of a connector.
| Value | Description |
|---|---|
ACTIVE | Connector is active and syncing on schedule. |
PAUSED | Connector is paused. No scheduled syncs will run. |
ERROR | Connector encountered an error during its last sync. Check errorMessage for details. |
SETUP | Connector is newly created and has not completed its first sync. |
ExecutionMode
Section titled “ExecutionMode”Where a connector’s sync logic runs.
| Value | Description |
|---|---|
CLOUD | Sync runs server-side on Cloudflare Workers. |
LOCAL | Sync runs on the user’s machine via the desktop app, pushing data through the Sync API. |
SyncRunStatus
Section titled “SyncRunStatus”The status of an individual sync run.
| Value | Description |
|---|---|
RUNNING | Sync is currently in progress. |
SUCCESS | Sync completed successfully. |
ERROR | Sync failed. Check errorMessage for details. |
CANCELLED | Sync was cancelled before completion. |
DocumentSortField
Section titled “DocumentSortField”Available sort fields for the documents query.
| Value | Description |
|---|---|
INDEXED_AT | Sort by when the document was indexed in Trove (default). |
CONTENT_DATE | Sort by the original publication date from the source. |
TITLE | Sort alphabetically by title. |
AUTHOR | Sort alphabetically by author. |
SortOrder
Section titled “SortOrder”Sort direction for the documents query.
| Value | Description |
|---|---|
ASC | Ascending order (oldest first, A-Z). |
DESC | Descending order (newest first, Z-A). Default. |