Skip to content

Installation

Install the packages you need depending on your use case.

If you plan to use all three packages (server + client + React hooks), install the umbrella package:

Terminal window
bun add graphql-suite graphql drizzle-orm @tanstack/react-query react

Then 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'

If you only need specific packages, install them separately. All three are published independently.

Terminal window
bun add @graphql-suite/schema graphql drizzle-orm

This is the core package. It takes your Drizzle table definitions and produces a full GraphQL schema at runtime.

Terminal window
bun add @graphql-suite/client drizzle-orm

A standalone client that builds type-safe GraphQL queries from your Drizzle schema. Works in any JavaScript environment (Node, Bun, browsers, React Native).

Terminal window
bun add @graphql-suite/query @tanstack/react-query react

Wraps the client in React hooks powered by TanStack Query. Use this if you are building a React frontend.

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.

PackagePeer dependencies
@graphql-suite/schemadrizzle-orm >= 0.44.0, graphql >= 16.3.0
@graphql-suite/clientdrizzle-orm >= 0.44.0
@graphql-suite/queryreact >= 18.0.0, @tanstack/react-query >= 5.0.0