Skip to content

tailcallhq/tailcall

Folders and files

NameName
Last commit message
Last commit date
Oct 26, 2024
May 2, 2024
Dec 24, 2024
Nov 2, 2024
Nov 28, 2024
Dec 18, 2024
Oct 23, 2024
Dec 13, 2024
Dec 26, 2024
Jan 17, 2025
Dec 28, 2023
Jan 17, 2025
Jan 17, 2025
Jan 17, 2025
Dec 9, 2024
May 13, 2024
Jul 21, 2024
Nov 27, 2024
Aug 12, 2024
Nov 25, 2024
Dec 6, 2024
Dec 13, 2024
Sep 29, 2024
May 25, 2024
Nov 20, 2024
Jan 17, 2025
Jan 18, 2024
May 2, 2024
Jan 4, 2024
Sep 8, 2023
Apr 25, 2024
Nov 20, 2024
Dec 9, 2024
Jan 26, 2024
May 2, 2024
Mar 4, 2024
Oct 23, 2023
Aug 10, 2024
Jan 31, 2025
Jan 31, 2025
Mar 16, 2024
Sep 27, 2023
Nov 28, 2024
Dec 31, 2023
Feb 9, 2024
Sep 8, 2023
Nov 17, 2023
Oct 20, 2024
Sep 21, 2024
Nov 20, 2023
Nov 2, 2024

Repository files navigation

Tailcall Logo

Tailcall is an open-source solution for building high-performance GraphQL backends.

Please support us by giving the repository a star image

Tweet Discord

Open Bounties Rewarded Bounties GitHub Workflow Status (with event) GitHub release (by tag) Discord Codecov

Installation

NPM

npm i -g @tailcallhq/tailcall

Yarn

yarn global add @tailcallhq/tailcall

Home Brew

brew tap tailcallhq/tailcall
brew install tailcall

Curl

curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/master/install.sh | bash

Docker

docker pull ghcr.io/tailcallhq/tailcall/tc-server
docker run -p 8080:8080 -p 8081:8081 ghcr.io/tailcallhq/tailcall/tc-server

Get Started

The below file is a standard .graphQL file, with a few additions such as @server and @http directives. So, basically, we specify the GraphQL schema and how to resolve that GraphQL schema in the same file, without having to write any code!

schema @server(port: 8000, hostname: "0.0.0.0") @upstream(httpCache: 42) {
  query: Query
}

type Query {
  posts: [Post] @http(url: "http://jsonplaceholder.typicode.com/posts")
  user(id: Int!): User @http(url: "http://jsonplaceholder.typicode.com/users/{{.args.id}}")
}

type User {
  id: Int!
  name: String!
  username: String!
  email: String!
  phone: String
  website: String
}

type Post {
  id: Int!
  userId: Int!
  title: String!
  body: String!
  user: User @http(url: "http://jsonplaceholder.typicode.com/users/{{.value.userId}}")
}

Now, run the following command to start the server with the full path to the jsonplaceholder.graphql file that you created above.

tailcall start ./jsonplaceholder.graphql

Head out to docs to learn about other powerful tailcall features.

Benchmarks

Throughput comparison of various GraphQL solutions for a N + 1 query:

query {
  posts {
    title
    body
    user {
      name
    }
  }
}

Throughput Histogram

Check out detailed benchmarks on our benchmarking repository.

Contributing

Your contributions are invaluable! Kindly go through our contribution guidelines if you are a first time contributor.

Support Us

⭐️ Give us a star.

👀 Watch us for updates.

License

This initiative is protected under the Apache 2.0 License.