Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Typesense GraphQL

105 sites Security covered
View on drupal.org

This module integrates Drupal with Typesense, exposing your search collections as a GraphQL API. It supports dynamic schema generation, full-text and semantic search, faceted filtering, and result highlighting, allowing you to query your Typesense data directly through GraphQL.

The Typesense GraphQL module provides comprehensive GraphQL integration for Typesense search collections in Drupal. It enables you to expose your Typesense search indexes as fully-featured GraphQL APIs with dynamic schema generation, faceted search, semantic search capabilities, and more.

The module consists of two parts:

  • Main module (typesense_graphql): Core GraphQL integration with dynamic schema generation, search queries, and faceting
  • Integration submodule (typesense_integration): Additional Search API processors for enhanced indexing capabilities

Key capabilities:

  • Expose Typesense search collections via GraphQL with dynamic schema generation
  • Full-text search with configurable field weights, typo tolerance, and search modes
  • Faceted search with filtering and selective facet loading
  • Semantic and hybrid search support (when embeddings are enabled)
  • Search result highlighting and detailed match information
  • Language-aware search and document retrieval
  • Performance optimizations for large-scale search applications

Requirements

Configuration

  1. Go to Administration > Configuration > Web services > GraphQL > Servers
  2. Edit the "core_composable" server (or your GraphQL server)
  3. In the "Schema Extensions" section, find "Typesense Search"
  4. Click "Configure" next to the Typesense Search extension
  5. Select which Typesense collections should be exposed via GraphQL
  6. Save the server configuration
  7. The GraphQL schema will be automatically updated to include only the enabled collections

FEATURES

GraphQL Queries

Search Query (searchTypesense)

Perform full-text searches across Typesense collections with support for:

  • Full-text search: Search across multiple fields with configurable weights
  • Field configuration: Per-field settings including:
    • Search weight
    • Prefix search (enabled/disabled)
    • Infix search (always/fallback/off)
    • Typo tolerance (numTypos)
  • Pagination: page and perPage parameters for result pagination
  • Language-aware: Automatically filters results by language when langcode field exists
  • Field selection: Include/exclude specific fields for performance optimization
  • Search modes:
    • KEYWORD_SEARCH: Traditional keyword-based search (default)
    • SEMANTIC_SEARCH: Vector-based semantic search (requires embeddings)
    • HYBRID_SEARCH: Combines keyword and semantic search (requires embeddings)
  • Hybrid search parameters:
    • alpha: Controls ratio between keyword and semantic scores (0.0-1.0, default: 0.8)
    • distanceThreshold: Vector distance threshold (default: 0.5)
  • Highlights: Field-level search result highlighting with snippet generation
  • Text match info: Detailed scoring information for debugging

Document Query (typesenseDocumentById)

Retrieve individual documents by their Typesense document ID:

  • Direct document access without search
  • Language-aware document retrieval
  • Full document data with all indexed fields

Faceted Search

  • Dynamic facet enums: Automatically generates TypesenseFacetId enum based on collection schema
  • Facet filtering: Filter results using selectedFacets parameter
  • Selective facet return: Use facetFields to specify which facets to return (performance optimization)
  • Nested facets: Support for hierarchical/taxonomy term facets with parent-child relationships
  • Facet metadata: Includes labels, counts, weights, and multilingual labels (all_labels)
  • Entity reference facets: Special handling for taxonomy term and node reference facets

Dynamic Schema Generation

The module automatically generates GraphQL types based on your Typesense collection schemas:

  • Collection enums: Dynamic TypesenseCollection enum based on enabled collections
  • Document types: Type-safe document types for each collection (e.g., TypesenseHitDocumentContent)
  • Hit types: Search result hit types with document, highlights, and match info
  • Search result types: Collection-specific search result types
  • Facet types: Dynamic facet ID enums and facet term types
  • Data type support:
    • Strings (single and arrays)
    • Integers (int32, int64, single and arrays)
    • Floats (single and arrays)
    • Booleans (single and arrays)
    • Date/time (TypesenseDateTime)
    • Geopoints (TypesenseGeopoint)
    • Entity references (TypesenseEntityReference) for taxonomy terms and nodes
    • Rokka images (TypesenseRokkaImage)

GraphQL Server Integration

  • Configuration stored within GraphQL server settings
  • No separate configuration forms or files needed
  • Settings persist with the GraphQL server configuration
  • Collection aliases: Custom aliases for collections in GraphQL schema
  • Schema automatically updates when configuration changes

Typesense Integration Submodule

The typesense_integration submodule provides helpful Search API processors:

  • Breadcrumbs processor (typesense_breadcrumb_text): Indexes breadcrumb text for nodes
  • Entity URL processor (typesense_entity_url): Indexes canonical URLs for entities (supports Media entities)
  • HTML Filter Safe processor (html_filter_safe): Improved HTML filtering that preserves word boundaries across block elements
  • Remove Excluded processor (typesense_remove_excluded): Filters out entities flagged to be excluded from search
  • Schema Alter Subscriber: Automatically sets locale for all fields based on site's default language

Performance Optimizations

  • Conditional facet loading: Facets are only returned when explicitly requested via facetFields
  • Field selection: Include/exclude specific fields to reduce payload size
  • Zero-hit queries: When hits are not requested, sets per_page to 0 for facet-only queries
  • Efficient filtering: Smart handling of null/empty facet filters

Example Queries

See example-queries.graphql and search-query.graphql for comprehensive examples of:

  • Basic searches
  • Faceted searches with filtering
  • Hybrid search with semantic features
  • Highlighting and text match info
  • Field selection and pagination

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
16
Tracked since
Nov 2025
Latest release
1 week ago
Releases (12 mo)
16 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.0-beta15 Pre-release 10–11 Aug 18, 2026
1.0.0-beta14 Pre-release 10–11 Aug 14, 2026
1.0.0-beta13 Pre-release 10–11 Aug 3, 2026
1.0.0-beta12 Pre-release 10–11 May 29, 2026
1.0.0-beta11 Pre-release 10–11 May 29, 2026
1.0.0-beta10 Pre-release 10–11 Mar 31, 2026
1.0.0-beta9 Pre-release 10–11 Feb 4, 2026
1.0.0-beta8 Pre-release 10–11 Jan 21, 2026
1.0.0-beta7 Pre-release 10–11 Dec 11, 2025
1.0.0-beta6 Pre-release 10–11 Dec 10, 2025
1.0.0-beta5 Pre-release 10–11 Dec 10, 2025
1.0.0-beta4 Pre-release 10–11 Dec 10, 2025
1.0.0-beta3 Pre-release 10–11 Nov 27, 2025
1.0.0-beta2 Pre-release 10–11 Nov 19, 2025
1.0.0-beta1 Pre-release 10–11 Nov 6, 2025
1.0.x-dev Dev 10–11 Nov 6, 2025