Callsheet
Getting Started

Installation

Install the packages you need for your setup.

Installation for React Query

Callsheet currently supports React Query v5. To get started, install @callsheet/react-query:

pnpm add @callsheet/react-query @tanstack/react-query

sh npm install @callsheet/react-query @tanstack/react-query

yarn add @callsheet/react-query @tanstack/react-query

Adding Code Generation

If you use code generation, Callsheet can automatically build from your generated typed requests. Install @callsheet/codegen to do so:

pnpm add -D @callsheet/codegen
sh npm add -D @callsheet/codegen
yarn add @callsheet/codegen -D
For GraphQL

For GraphQL apps it's pretty simple:

  1. Generate typed documents with GraphQL Code Generator
  2. Point Callsheet codegen at that output
  3. Callsheet will auto-generate a call module with all of your existing requests

For more details on GraphQL codegen, read Using Callsheet with GraphQL.

For ts-rest

If you want Callsheet to auto-generate calls from ts-rest contracts, add @ts-rest/core in addition to @callsheet/codegen:

pnpm add @ts-rest/core

For more on codegen for ts-rest, read the TS-Rest Guide.

Callsheet Packages

  • @callsheet/react-query
    For defining and using calls in React Query
  • @callsheet/codegen
    Generates Callsheets automatically from typed sources like GraphQL Code Generator output and ts-rest contracts.
  • @callsheet/ts-rest
    Adds the typed REST source adapter for ts-rest.

Next Steps

If you want the fastest end-to-end path, go to Quickstart.

If you want a deeper package breakdown, go to Packages and Imports.

On this page