Skip to content
ContractSpec
Start here

Package manual · platform

·Handlers, runtimes and transports

lib.graphql-core

Shared GraphQL core: Pothos builder factory, scalars, tracing & complexity

platformlibraryv5.1.3stableservernode
@lssm-tech/lib.graphql-core
bun add @lssm-tech/lib.graphql-core
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Website: https://contractspec.io

Shared GraphQL core: Pothos builder factory, scalars, tracing & complexity.

What It Provides

  • Layer: lib.
  • Consumers: graphql-federation, graphql-prisma, contracts-runtime-server-graphql, bundles.
  • Related ContractSpec packages include @lssm-tech/tool.bun, @lssm-tech/tool.typescript.
  • Related ContractSpec packages include @lssm-tech/tool.bun, @lssm-tech/tool.typescript.

Installation

npm install @lssm-tech/lib.graphql-core

or

bun add @lssm-tech/lib.graphql-core

Usage

Import the root entrypoint from @lssm-tech/lib.graphql-core, or choose a documented subpath when you only need one part of the package surface.

Architecture

  • src/index.ts is the root public barrel and package entrypoint.

Public Entry Points

  • Export . resolves through ./src/index.ts.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rm -rf dist
  • bun run prebuild — contractspec-bun-build prebuild
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.

Notes

  • Builder factory is consumed by all GraphQL packages — interface changes have high blast radius.
  • Scalar definitions must stay aligned with the schema lib.
  • Tracing and complexity plugins must not introduce runtime overhead in production without opt-in.

Relationships

THIS PACKAGElib.graphql-core2 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

8 declarations

  • @pothos/core

    catalog:graphql

  • @pothos/plugin-complexity

    catalog:graphql

  • @pothos/plugin-dataloader

    catalog:graphql

  • @pothos/plugin-relay

    catalog:graphql

  • @pothos/plugin-tracing

    catalog:graphql

  • graphql

    catalog:graphql

Declared capabilities

Lib Graphql Core

Shared GraphQL core: Pothos builder factory, scalars, tracing & complexity

Scripts

  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildcontractspec-bun-build build
  • devcontractspec-bun-build dev
  • cleanrm -rf dist
  • prebuildcontractspec-bun-build prebuild
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • typechecktsgo --noEmit