GithubHelp home page GithubHelp logo

smiklos / tailcall Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tailcallhq/tailcall

0.0 0.0 0.0 16.43 MB

A high-performance GraphQL proxy, optimized for cloud-native environments, covering edge, middle, and service layers.

Home Page: https://tailcall.run

License: Apache License 2.0

Shell 0.29% JavaScript 0.21% Lua 0.01% Rust 98.70% Dockerfile 0.01% TypeScript 0.68% HTML 0.10%

tailcall's Introduction

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(baseURL: "http://jsonplaceholder.typicode.com", httpCache: 42) {
  query: Query
}

type Query {
  posts: [Post] @http(path: "/posts")
  user(id: Int!): User @http(path: "/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(path: "/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.

tailcall's People

Contributors

a-n-uraag avatar aaditmshah avatar adelinaenache avatar alankritdabral avatar amitksingh1490 avatar ayewo avatar bnchi avatar dependabot[bot] avatar ezhil56x avatar karatakis avatar kremedev avatar laststylebender14 avatar lazyfuhrer avatar mayant15 avatar mehulmathur16 avatar meskill avatar mogery avatar neo773 avatar ologbonowiwi avatar ouertani avatar renovate[bot] avatar shashitnak avatar shylock-hg avatar ssddontop avatar sujeetsr avatar tobihans avatar tusharmath avatar webbdays avatar wrath-of-god avatar yougigun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.