graphql-compose-elasticsearch version 5.2.3 is a library that exposes the Elasticsearch REST API via GraphQL. It acts as a proxy to the official elasticsearch-js client, automatically generating GraphQL field configs for all available Elasticsearch methods (search, index, delete, etc.) with params and descriptions. Additionally, it provides a plugin for graphql-compose that derives GraphQL types from Elasticsearch mappings, generating resolvers like search, searchConnection (Relay Cursor Connection), searchPagination, findById, and updateById. It supports Elasticsearch versions 1.7 through 7.x and requires graphql-compose ^7.0.4, ^8.0.0, or ^9.0.0. The library ships TypeScript types and is actively maintained.
npm install graphql-compose-elasticsearchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a GraphQL schema that exposes Elasticsearch API for two different versions (5.0 and 2.4) using elasticApiFieldConfig.
Install compatible graphql-compose: npm install graphql-compose@^9.0.0
Use elasticsearch v16.x with graphql-compose-elasticsearch, or migrate to a newer Elastic client.
Use searchPagination or custom pagination for backward navigation.
Ensure the mapping object has a 'properties' key with valid field definitions.
Upgrade graphql-compose to ^7.0.4 or higher (^8.0.0 or ^9.0.0 recommended).
Use named import: import { elasticApiFieldConfig } from 'graphql-compose-elasticsearch'Run: npm install graphql-compose@^9.0.0
Provide either a Client instance or a plain config object consistently.
Check your Elasticsearch mapping and ensure it contains a 'properties' object.