lib.contracts-runtime-server-graphql
GraphQL server runtime adapters for ContractSpec contracts
@lssm-tech/lib.contracts-runtime-server-graphqlbun add @lssm-tech/lib.contracts-runtime-server-graphqlManifest declarations describe the current workspace; they do not verify registry publication or runtime execution.
Package guide
GraphQL server runtime adapters for ContractSpec contracts.
What It Provides
- Layer: lib.
- Consumers: bundles, apps with GraphQL.
- Related ContractSpec packages include
@lssm-tech/lib.contracts-runtime-server-rest,@lssm-tech/lib.contracts-spec,@lssm-tech/lib.schema,@lssm-tech/tool.bun,@lssm-tech/tool.typescript. - Related ContractSpec packages include
@lssm-tech/lib.contracts-runtime-server-rest,@lssm-tech/lib.contracts-spec,@lssm-tech/lib.schema,@lssm-tech/tool.bun,@lssm-tech/tool.typescript.
Installation
npm install @lssm-tech/lib.contracts-runtime-server-graphql
or
bun add @lssm-tech/lib.contracts-runtime-server-graphql
Usage
Import the root entrypoint from @lssm-tech/lib.contracts-runtime-server-graphql, or choose a documented subpath when you only need one part of the package surface.
Query envelope params
Every contract resolver puts a QueryEnvelope on HandlerCtx.queryEnvelope. By default it holds the operation and the field's input argument as sent (before contract validation; absent for a field without input), and the schema is unchanged. With registerContractsOnBuilder(builder, registry, resources, { queryEnvelopeArg: true }) each contract field also accepts an optional envelope: JSON argument (the builder must register a JSON scalar, or building the schema fails) carrying search, filters, sort, pagination, cache, tags, consistency and economic evidence refs. Malformed params raise a BAD_REQUEST GraphQL error before the handler runs.
Architecture
src/graphql-pothos.tsis part of the package's public or composition surface.src/index.tsis the root public barrel and package entrypoint.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./graphql-pothosresolves through./src/graphql-pothos.ts.
Local Commands
bun run dev— contractspec-bun-build devbun run build— contractspec-bun-build buildbun run lint— bun run lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsgo --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 build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun run prebuild— contractspec-bun-build prebuild
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
Notes
- Pothos builder integration must stay compatible with graphql-core and graphql-prisma.
- Do not introduce direct schema mutations outside the Pothos pipeline.
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
11 declarations
@lssm-tech/lib.contracts-runtime-coreworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-runtime-kernelworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-runtime-server-restworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-spec-coreworkspace:^
Read the package manual ↗@lssm-tech/lib.schemaworkspace:^
Read the package manual ↗@lssm-tech/lib.utils-typescriptworkspace:^
Read the package manual ↗
Declared capabilities
GraphQL server runtime adapters for ContractSpec contracts
Scripts
publish:pkgbun publish --tolerate-republish --ignore-scripts --verbosepublish:pkg:canarybun publish:pkg --tag canarycleanrm -rf distlintbun run lint:fixlint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .lint:checknode ../../../../scripts/biome.cjs check .buildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typesprebuildcontractspec-bun-build prebuildtypechecktsgo --noEmitdevcontractspec-bun-build dev