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.4.0 || ^17.0.0 |
@graphql-suite/client |
drizzle-orm >= 0.44.0 |
@graphql-suite/query |
react >= 18.0.0, @tanstack/react-query >= 5.0.0 |
@graphql-suite/schema has no runtime dependencies of its own — graphql and drizzle-orm are the
only libraries it loads, and both come from your app.
graphql 16 or 17
Section titled “graphql 16 or 17”Both majors are supported, and CI builds, type-checks and tests the whole project against each. Pick whichever your server framework supports:
- graphql 16 — the safe default, accepted everywhere in the current ecosystem.
- graphql 17 — requires Node 22 or newer, and every other GraphQL library in your app has to accept it too. graphql-yoga supports graphql 17 from 5.22.0; on older versions requests carrying variables fail inside Yoga. graphql-http accepts it as well.
Whichever you choose, buildSchema() returns a plain GraphQLSchema, so the server library is your
call — this package does not wrap one.
Install exactly one copy. Two copies of graphql in a single process fail instanceof checks
against each other, and the schema breaks at query time with errors like
Cannot use GraphQLNonNull "..." from another module or realm. If you hit that, check
npm ls graphql (or bun pm ls graphql) for a duplicate pulled in by another dependency.