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-querysh npm install @callsheet/react-query @tanstack/react-query
yarn add @callsheet/react-query @tanstack/react-queryAdding 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/codegensh npm add -D @callsheet/codegen yarn add @callsheet/codegen -DFor GraphQL apps it's pretty simple:
- Generate typed documents with GraphQL Code Generator
- Point Callsheet codegen at that output
- 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-restIf you want Callsheet to auto-generate calls from ts-rest contracts, add @ts-rest/core in addition to @callsheet/codegen:
pnpm add @ts-rest/coreFor 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 andts-restcontracts.@callsheet/ts-rest
Adds the typed REST source adapter forts-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.