Skip to main content
ConnectorFilter defines the document-routing rules applied to output connectors during sync orchestration. Each row is either a template filter (template=true, workspace=null β€” a platform-managed default shared across all workspaces for a given connector type) or a custom filter (template=false, workspace scoped β€” workspace-specific overrides). The config column carries a Hasura WHERE-clause JSONB predicate that gates which documents flow to the target connector, while natural_language provides a human-readable description for display in the workflow editor. ConnectorFilters are written exclusively by the seed pipeline (mikro:seed:connector-filters command and its migration equivalent) and surfaced read-only via the workspace-connectors JSON:API as a sideloaded included resource.
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

Data model

Attributes

Relationships

System-computed

  • connector_filter_id β€” generated by gen_random_uuid() database default on INSERT; unique constraint ensures no collision
  • created_at β€” set by MikroORM onCreate: () => new Date() hook; never modified after creation
  • updated_at β€” set by both MikroORM onCreate and onUpdate hooks; reflects last modification time by the seed/migration pipeline
  • deleted_at β€” soft-delete sentinel; set by the seed pipeline (syncConnectorFilters) when a filter is logically removed; never modified by user API calls
  • Template filter identity β€” the seed pipeline enforces a one-template-per-output-connector invariant: identity = (connector.pk, template=true, workspace=null, deleted_at=null); subsequent seed runs update config and natural_language in place rather than inserting duplicates
  • Indexes β€” idx_connector_filters_workspace_deleted (workspace, deleted_at) for Hasura permission filter hot path; idx_connector_filters_connector_workspace (connector, workspace, template) for sync orchestration lookup; both created by Migration20260416000000_hasura_and_service_hot_path_indexes_round4

Example

Source: apps/api/src/database/entities/ConnectorFilter.ts Β· domain: ingestion Β· tier: Infrastructure