---
description:
  Easily generate executable schema for Apache Thrift services with GraphQL Mesh Thrift handler.Get
  started by installing `@graphql-mesh/thrift`.
---

# Apache Thrift

![image](https://user-images.githubusercontent.com/20847995/79219986-e4903080-7e5b-11ea-8220-e69ae73e7966.png)

This handler allows you to consume [Apache Thrift](https://thrift.apache.org) `.thrift` files and
generate a remote executable schema for those services.

To get started, install the handler library:

```sh npm2yarn
npm i @graphql-mesh/thrift
```

Now, you can use it directly in your Mesh config file:

```yaml filename=".meshrc.yaml" {4-9}
sources:
  - name: Calculator
    handler:
      thrift:
        idl: ./src/thrift/calculator.thrift
        hostName: localhost
        port: 8080
        path: /thrift
        serviceName: calculator-service
```

You can check out our example that uses Thrift Handler.

<iframe
  src="https://codesandbox.io/embed/github/ardatan/graphql-mesh/tree/master/examples/thrift-example?fontsize=14&hidenavigation=1&theme=dark&module=%2F.meshrc.yml"
  className="mt-6 w-full h-[500px] rounded-md"
  title="thrift-example"
  allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
  sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
/>

## Headers

[Read about configuration and examples](/docs/guides/headers)

## Config API Reference

import API from '../../../generated-markdown/ThriftHandler.generated.md'

<API />
