Loading...
Please wait a moment

GraphQL to Elasticsearch Converter Online — Convert GraphQL Queries to ES DSL

Paste your GraphQL query above and get the equivalent Elasticsearch DSL query instantly. This tool converts field selections to _source filters, arguments to bool query conditions, and pagination args to size/from — all processed entirely in your browser.

How to Convert GraphQL to Elasticsearch — Step-by-Step

Step 1

Input Your GraphQL Query

Building an Elasticsearch backend for your GraphQL API? Paste your query from a GraphiQL playground, Apollo Explorer, or application code.

Paste: Copy your GraphQL query and paste — conversion is instant
Upload: Select a .graphql or .gql file
Sample: See a query with arguments, sorting, and field selections converted
Step 2

Automatic Conversion

The converter maps GraphQL concepts to Elasticsearch Search API:

Root field name: Becomes the index name in GET /index/_search
Field selections: Become the _source array
String arguments: Become match conditions, numeric become term conditions
orderBy / limit / offset: Become sort, size, from
Step 3

Copy or Download

Copy: Paste into Kibana Dev Tools or your Elasticsearch client
Download: Save as .json

Frequently Asked Questions

How does GraphQL map to Elasticsearch?

Root query fields become Elasticsearch indices, field selections become the _source array, and arguments become bool query conditions (match for strings, term for exact values).

Does it support sorting and pagination?

Yes. orderBy arguments are converted to sort clauses, limit/first become size, and offset/skip become from.

Is this converter free?

Completely free, no limits. Also try: GraphQL to SQL, MongoDB to GraphQL, GraphQL to REST, GraphQL Formatter.