The modern
GraphQL runtime
Swiftly design and ship best-practice GraphQL backends atop existing data sources and 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)
@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:
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": {
"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
REST APIs are
not composable
API composition is pivotal for building rich user experiences, but REST APIs are not inherently composable, often leading to awkward, unmaintainable hand-written Backend for Frontends. On the other hand, GraphQL is a highly composable protocol, giving clients the power to express exactly what they need, and Tailcall makes GraphQL easy, secure, and fast.
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.
![Orchestration](/assets/images/orchestration-4c0c2f616cd4988fd926b502ac7861a4.png)
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.
![Governance](/assets/images/governance-87cbd0bf6ad53d42d9a5c7955e4cbfa8.png)
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.
![Efficiency](/assets/images/efficiency-d56bb9f1ebf657a855c0c1c3f8fe84dd.png)
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.
![Extendability](/assets/images/extendability-a206f176f9a20ecda88e79ef859c64eb.png)
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.
Has this sparked your interest?
![pixel](https://static.scarf.sh/a.png?x-pxid=45ec365f-ab8a-4848-a6a9-bd4ffecfe72e)