@contractspec/lib.graphql-prisma
v3.7.14
Published
Pothos + Prisma builder factory with injectable client/DMMF
Downloads
4,528
Maintainers
Readme
@contractspec/lib.graphql-prisma
Website: https://contractspec.io
Pothos + Prisma builder factory with injectable client/DMMF.
What It Provides
- Layer: lib.
- Consumers: bundles with Prisma.
- Related ContractSpec packages include
@contractspec/lib.schema,@contractspec/tool.bun,@contractspec/tool.typescript. - Related ContractSpec packages include
@contractspec/lib.schema,@contractspec/tool.bun,@contractspec/tool.typescript.
Installation
npm install @contractspec/lib.graphql-prisma
or
bun add @contractspec/lib.graphql-prisma
Usage
Import the root entrypoint from @contractspec/lib.graphql-prisma, or choose a documented subpath when you only need one part of the package surface.
Architecture
src/index.tsis the root public barrel and package entrypoint.
Public Entry Points
- Export
.resolves through./src/index.ts.
Local Commands
bun run dev— contractspec-bun-build devbun run build— bun run prebuild && bun run build:bundle && bun run build:typesbun run typecheck— tsc --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rm -rf distbun run prebuild— contractspec-bun-build prebuildbun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build types
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
Notes
- Prisma client injection must stay lazy — eagerly importing the client breaks tree-shaking and test isolation.
- DMMF handling is version-sensitive; Prisma major upgrades require validation here first.
- Depends on graphql-core — keep builder factory usage aligned.
