Installation
Pick an adapter to get started, then add packages for code generation or ts-rest as needed.
Choose an adapter
Install the adapter package for the data-fetching library you use.
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-querySWR
pnpm add @callsheet/swr swrsh npm install @callsheet/swr swr yarn add @callsheet/swr swrThe adapter package includes everything you need to define and use calls.
Add code generation (optional)
If you want Callsheet to generate calls from your existing typed sources, add the codegen package:
pnpm add -D @callsheet/codegensh npm install -D @callsheet/codegen yarn add @callsheet/codegen -DGraphQL
For GraphQL apps with code-generation, Callsheet can build from GraphQL Code Generator output.
For more on GraphQL setup, read Using Callsheet with GraphQL.
ts-rest
For ts-rest apps, add @ts-rest/core and Callsheet will build from your existing contracts.
pnpm add @ts-rest/coresh npm install @ts-rest/core yarn add @ts-rest/coreManual ts-rest calls
If you are wrapping ts-rest routes by hand instead of using code generation, add the ts-rest source package:
pnpm add @callsheet/ts-rest @ts-rest/coresh npm install @callsheet/ts-rest @ts-rest/core yarn add @callsheet/ts-rest @ts-rest/coreFor more details on ts-rest setup, read the ts-rest guide.
Callsheet Packages
@callsheet/react-query: adapter for React Query apps@callsheet/swr: adapter for SWR apps@callsheet/codegen: automatically generate Callsheet from sources@callsheet/ts-rest: for manualts-restintegration
Next Steps
If you're ready to get started with Callsheet, go to Quickstart.
If you want a deeper package breakdown, go to Packages and Imports.