API platform engineered for scale
Tailcall is a high-performance open-source API orchestrator that allows organizations to build versatile data access layers, atop existing APIs.
Get Started
Setup Tailcall via npm to build a high-performance GraphQL API on top of existing REST endpoints. Checkout our docs for detailed tutorials and guides.
npm i -g @tailcallhq/tailcall
- graphql
- yaml
- json
schema
@server(port: 8000, graphiql: true)
@upstream(baseURL: "http://jsonplaceholder.typicode.com") {
query: Query
}
type Query {
users: [User] @http(path: "/users")
posts: [Post] @http(path: "/posts")
}
type User {
id: Int!
name: String!
username: String!
email: String!
}
type Post {
id: Int!
title: String!
body: String!
userId: Int!
# Expand a post with user information
user: User @http(path: "/users/{{.value.userId}}")
}
tailcall start ./app.graphql
server:
graphiql: true
port: 8000
upstream:
baseURL: http://jsonplaceholder.typicode.com
schema:
query: Query
types:
Post:
fields:
body:
type: String
required: true
cache: null
id:
type: Int
required: true
cache: null
title:
type: String
required: true
cache: null
user:
type: User
http:
path: /users/{{.value.userId}}
cache: null
userId:
type: Int
required: true
cache: null
cache: null
Query:
fields:
posts:
type: Post
list: true
http:
path: /posts
cache: null
users:
type: User
list: true
http:
path: /users
cache: null
cache: null
User:
fields:
email:
type: String
required: true
cache: null
id:
type: Int
required: true
cache: null
name:
type: String
required: true
cache: null
username:
type: String
required: true
cache: null
cache: null
tailcall start ./app.yaml
{
"server": {
"graphiql": true,
"port": 8000
},
"upstream": {
"baseURL": "http://jsonplaceholder.typicode.com"
},
"schema": {
"query": "Query"
},
"types": {
"Post": {
"fields": {
"body": {
"type": "String",
"required": true,
"cache": null
},
"id": {
"type": "Int",
"required": true,
"cache": null
},
"title": {
"type": "String",
"required": true,
"cache": null
},
"user": {
"type": "User",
"http": {
"path": "/users/{{.value.userId}}"
},
"cache": null
},
"userId": {
"type": "Int",
"required": true,
"cache": null
}
},
"cache": null
},
"Query": {
"fields": {
"posts": {
"type": "Post",
"list": true,
"http": {
"path": "/posts"
},
"cache": null
},
"users": {
"type": "User",
"list": true,
"http": {
"path": "/users"
},
"cache": null
}
},
"cache": null
},
"User": {
"fields": {
"email": {
"type": "String",
"required": true,
"cache": null
},
"id": {
"type": "Int",
"required": true,
"cache": null
},
"name": {
"type": "String",
"required": true,
"cache": null
},
"username": {
"type": "String",
"required": true,
"cache": null
}
},
"cache": null
}
}
}
tailcall start ./app.json
Where traditional
gateways fail?
A traditional API Gateway restricts operations to an API's route, method, or headers, and doesn't allow modifications to the request and response bodies. This limitation constrains the operations that can be performed on an API, ultimately compelling engineering teams to either intertwine orchestration logic with business logic or to develop and maintain a separate layer of abstraction such as BFF (backend for frontend).
Orchestration
Tailcall provides first-class primitives to perform API Orchestration across protocols such as gRPC, REST, GraphQL,. This allow developers to enrich existing APIs with more data, perform transformations or build a completely new set of aggregation APIs.
Governance
With Tailcall, your focus shifts to the 'what'—such as entities, their relationships, access control, security, authentication, caching, and more—rather than the 'how'. This shift is enabled by the Tailcall DSL, embodying a true declarative approach to managing APIs. Unlike traditional API gateways that apply these properties directly to APIs, Tailcall's DSL simplifies governance and clarifies semantics, providing a more intuitive framework for API management.
Efficiency
Tailcall can introspect all orchestration requirements ahead of time and automatically generate a highly efficient data access layer. This results in achieving much lower resource utilization and opens up opportunities to use in ultra-low latency workloads.
Extendability
At times, the built-in primitives may not fully satisfy specific orchestration needs. In such instances, Tailcall offers a lightweight embedded JavaScript runtime. This feature enables you to attach custom hooks for monitoring events within Tailcall, allowing you to directly issue commands for the subsequent actions Tailcall should execute.
There’s so much more.
Platform made for performance.
More reasons to choose tailcall.
Top developer experience
Design your APIs, with syntax highlighting and lint checks within your favourite IDE.
Performance
Get performance that’s higher than your hand optimized implementation
Scale Fearlessly
Leverage built-in best practices that guarantee robustness at any scale.