Installation
Install the packages you need depending on your use case.
All-in-one (umbrella package)
Section titled “All-in-one (umbrella package)”If you plan to use all three packages (server + client + React hooks), install the umbrella package:
bun add graphql-suite graphql drizzle-orm @tanstack/react-query reactnpm install graphql-suite graphql drizzle-orm @tanstack/react-query reactpnpm add graphql-suite graphql drizzle-orm @tanstack/react-query reactyarn add graphql-suite graphql drizzle-orm @tanstack/react-query reactThen import from the scoped packages — this works with both install approaches:
import { buildSchema } from '@graphql-suite/schema'import { createDrizzleClient } from '@graphql-suite/client'import { GraphQLProvider, useEntity } from '@graphql-suite/query'Individual packages
Section titled “Individual packages”If you only need specific packages, install them separately. All three are published independently.
Server (schema builder)
Section titled “Server (schema builder)”bun add @graphql-suite/schema graphql drizzle-ormnpm install @graphql-suite/schema graphql drizzle-ormpnpm add @graphql-suite/schema graphql drizzle-ormyarn add @graphql-suite/schema graphql drizzle-ormThis is the core package. It takes your Drizzle table definitions and produces a full GraphQL schema at runtime.
Client (type-safe GraphQL client)
Section titled “Client (type-safe GraphQL client)”bun add @graphql-suite/client drizzle-ormnpm install @graphql-suite/client drizzle-ormpnpm add @graphql-suite/client drizzle-ormyarn add @graphql-suite/client drizzle-ormA standalone client that builds type-safe GraphQL queries from your Drizzle schema. Works in any JavaScript environment (Node, Bun, browsers, React Native).
React hooks (optional)
Section titled “React hooks (optional)”bun add @graphql-suite/query @tanstack/react-query reactnpm install @graphql-suite/query @tanstack/react-query reactpnpm add @graphql-suite/query @tanstack/react-query reactyarn add @graphql-suite/query @tanstack/react-query reactWraps the client in React hooks powered by TanStack Query. Use this if you are building a React frontend.
Peer dependencies
Section titled “Peer dependencies”Each package has its own peer dependencies that you must install alongside it. This ensures your application uses a single copy of each library, avoiding version conflicts.
| Package | Peer dependencies |
|---|---|
@graphql-suite/schema | drizzle-orm >= 0.44.0, graphql >= 16.3.0 |
@graphql-suite/client | drizzle-orm >= 0.44.0 |
@graphql-suite/query | react >= 18.0.0, @tanstack/react-query >= 5.0.0 |