Skip to content

Type Reference

This page documents every type in the Trove GraphQL schema.

ScalarFormatExample
DateTimeISO 8601 string"2026-03-25T12:00:00Z"
JSONArbitrary JSON value{ "key": "value" }, 42, [1, 2, 3]

Container for search and discovery query results.

FieldTypeDescription
results[SearchResult!]!Array of ranked search results.
totalMatchesInt!Total number of matching documents (may exceed the returned results).
queryTimeMsInt!Time taken to execute the search in milliseconds.

A single search result with its document and relevance metadata.

FieldTypeDescription
documentDocument!The matched document.
snippetString!A text snippet showing the most relevant passage.
relevanceScoreFloat!Similarity score between 0 and 1. Higher is more relevant.

A piece of content stored in your knowledge base.

FieldTypeNullableDescription
idID!NoUnique document identifier.
connectorConnector!NoThe connector this document belongs to.
externalIdString!NoIdentifier from the source system (e.g., tweet ID, article URL hash).
titleStringYesDocument title.
urlStringYesSource URL.
authorStringYesDocument author.
contentDateDateTimeYesOriginal publication or creation date from the source.
indexedAtDateTime!NoTimestamp when the document was indexed in Trove.
previewTextStringYesFirst ~300 words of the document, stored in D1 for fast access. Use this for listings and summaries.
fullTextStringYesComplete document text. Lazy-loaded from R2 storage on demand. Only request this field when you need the full content.
wordCountIntYesTotal word count of the document.
contentTypeString!NoContent type label. One of: "text", "transcript", "highlight", "bookmark".
tags[String!]!NoArray of tags applied to the document.
metadataJSONYesArbitrary metadata from the source system.
createdAtDateTime!NoTimestamp when the document record was created.

Paginated document list returned by the documents query.

FieldTypeDescription
nodes[Document!]!Array of documents in the current page.
totalCountInt!Total number of documents matching the filters.
hasMoreBoolean!Whether more documents exist beyond the current page.

A configured data source that ingests documents into your knowledge base.

FieldTypeNullableDescription
idID!NoUnique connector identifier.
connectorTypeString!NoType of connector (e.g., "rss", "hacker-news", "podcast", "manual").
nameString!NoDisplay name.
descriptionStringYesOptional description.
iconStringYesIcon identifier or emoji.
statusConnectorStatus!NoCurrent status: ACTIVE, PAUSED, ERROR, or SETUP.
executionExecutionMode!NoExecution mode: CLOUD or LOCAL.
configJSONYesConnector configuration. Sensitive fields (API keys, tokens) are redacted and never returned.
scheduleStringYesSchedule string for scheduled syncs (e.g., "every 6 hours", "daily").
cursorStringYesCurrent sync cursor position.
documentCountInt!NoTotal number of documents from this connector.
lastSyncedAtDateTimeYesTimestamp of the last successful sync.
nextSyncAtDateTimeYesTimestamp of the next scheduled sync.
errorMessageStringYesError message if the connector is in ERROR status.
createdAtDateTime!NoTimestamp when the connector was created.
updatedAtDateTime!NoTimestamp of the last update.
recentDocuments[Document!]!NoLatest documents from this connector. Accepts limit argument (default 5).
topAuthors[AuthorStat!]!NoMost prolific authors in this connector. Accepts limit argument (default 5).
dateRangeDateRangeYesEarliest and latest document dates in this connector.
syncRuns[SyncRun!]!NoRecent sync run history. Accepts limit argument (default 5).

Author frequency data for a connector.

FieldTypeDescription
authorString!Author name.
documentCountInt!Number of documents by this author.

Date bounds for documents in a connector.

FieldTypeNullableDescription
earliestDateTimeYesEarliest document date. null if the connector has no dated documents.
latestDateTimeYesLatest document date. null if the connector has no dated documents.

A record of a connector sync execution.

FieldTypeNullableDescription
idID!NoUnique sync run identifier.
connectorConnector!NoThe connector this sync run belongs to.
statusSyncRunStatus!NoCurrent status: RUNNING, SUCCESS, ERROR, or CANCELLED.
sourceExecutionMode!NoWhether this sync ran via CLOUD or LOCAL.
documentsSyncedInt!NoNumber of documents indexed in this run.
cursorBeforeStringYesCursor position before the sync started.
cursorAfterStringYesCursor position after the sync completed.
errorMessageStringYesError message if the sync failed.
startedAtDateTime!NoTimestamp when the sync started.
completedAtDateTimeYesTimestamp when the sync completed. null if still running.
durationMsIntYesTotal sync duration in milliseconds. null if still running.

Account-level statistics and aggregates.

FieldTypeDescription
totalDocumentsInt!Total number of documents across all connectors.
totalConnectorsInt!Total number of connectors.
activeConnectorsInt!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).
nextScheduledSyncConnectorThe connector with the nearest upcoming scheduled sync, or null if no syncs are scheduled.

Document count for a specific connector type.

FieldTypeDescription
connectorTypeString!The connector type (e.g., "rss", "hacker-news").
documentCountInt!Number of documents from connectors of this type.

Document count for a specific content type.

FieldTypeDescription
contentTypeString!The content type (e.g., "text", "transcript").
documentCountInt!Number of documents with this content type.

Result of a batch document ingestion.

FieldTypeNullableDescription
documentsIndexedInt!NoNumber of documents successfully indexed.
documentsSkippedInt!NoNumber of documents skipped (already exist with the same externalId).
cursorStringYesUpdated cursor position for the connector.
errors[IngestError!]YesArray of per-document errors, if any. null when all documents succeed.

Error details for a single document that failed during ingestion.

FieldTypeDescription
externalIdString!The externalId of the document that failed.
messageString!Description of the error.

Input for the createConnector mutation.

FieldTypeRequiredDescription
connectorTypeString!YesThe type of connector (e.g., "rss", "hacker-news", "podcast").
nameString!YesDisplay name for the connector.
descriptionStringNoOptional description.
iconStringNoIcon identifier or emoji.
executionExecutionMode!YesCLOUD for server-side syncs, LOCAL for desktop app syncs.
configJSON!YesConnector-specific configuration (feed URLs, credentials, etc.).
scheduleStringNoSchedule string for scheduled syncs. Supported values: "every 30 minutes", "every hour", "every 6 hours", "every 12 hours", "daily".

Input for the updateConnector mutation. All fields are optional; only included fields are updated.

FieldTypeRequiredDescription
nameStringNoNew display name.
descriptionStringNoNew description.
configJSONNoUpdated configuration. Replaces the entire config object.
scheduleStringNoUpdated schedule string. Supported values: "every 30 minutes", "every hour", "every 6 hours", "every 12 hours", "daily".

Input for the saveDocument mutation (quick save).

FieldTypeRequiredDescription
textStringNoText content to save.
urlStringNoSource URL.
titleStringNoDocument title.
sourceStringNoLabel for the save source (e.g., "clipboard", "share-extension").
tags[String!]NoTags to apply.

Input for a single document in the ingestDocuments mutation.

FieldTypeRequiredDescription
externalIdString!YesUnique identifier from the source system. Used for deduplication with connectorId.
titleStringNoDocument title.
textStringNoFull text content. Required unless audioUrl is provided.
audioUrlStringNoURL to an audio file for transcription via Workers AI.
urlStringNoSource URL.
authorStringNoDocument author.
dateDateTimeNoOriginal publication or creation date.
contentTypeStringNoContent type label. One of: "text", "transcript", "highlight", "bookmark".
tags[String!]NoTags to apply.
metadataJSONNoArbitrary metadata stored with the document.

The operational status of a connector.

ValueDescription
ACTIVEConnector is active and syncing on schedule.
PAUSEDConnector is paused. No scheduled syncs will run.
ERRORConnector encountered an error during its last sync. Check errorMessage for details.
SETUPConnector is newly created and has not completed its first sync.

Where a connector’s sync logic runs.

ValueDescription
CLOUDSync runs server-side on Cloudflare Workers.
LOCALSync runs on the user’s machine via the desktop app, pushing data through the Sync API.

The status of an individual sync run.

ValueDescription
RUNNINGSync is currently in progress.
SUCCESSSync completed successfully.
ERRORSync failed. Check errorMessage for details.
CANCELLEDSync was cancelled before completion.

Available sort fields for the documents query.

ValueDescription
INDEXED_ATSort by when the document was indexed in Trove (default).
CONTENT_DATESort by the original publication date from the source.
TITLESort alphabetically by title.
AUTHORSort alphabetically by author.

Sort direction for the documents query.

ValueDescription
ASCAscending order (oldest first, A-Z).
DESCDescending order (newest first, Z-A). Default.