Skip to content
ContractSpec
Start here

Package manual · platform

·Handlers, runtimes and transports

lib.graphql-federation

Pothos federation helpers and subgraph schema export utilities

platformlibraryv6.0.3stableservernode
@lssm-tech/lib.graphql-federation
bun add @lssm-tech/lib.graphql-federation
Package source ↗Manifest ↗

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

Package guide

Website: https://contractspec.io

Apollo Federation hosts require GraphQL ^16.14.2. Apollo Subgraph 2.15 does not support GraphQL 17; do not force that version through overrides.

Pothos federation helpers and subgraph schema export utilities.

What It Provides

  • Layer: lib.
  • Consumers: bundles with federated GraphQL.
  • 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-federation

or

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

Usage

Import the root entrypoint from @lssm-tech/lib.graphql-federation, 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

  • Federation directives must comply with the Apollo Federation spec; non-compliant changes break gateway composition.
  • Depends on graphql-core — keep builder factory usage aligned.

Relationships

THIS PACKAGElib.graphql-federation2 import paths

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

6 declarations

  • @pothos/core

    catalog:graphql

  • @pothos/plugin-federation

    ^4.5.3

  • @pothos/plugin-directives

    ^4.3.2

  • graphql

    catalog:graphql

  • @apollo/subgraph

    ^2.15.1

  • @lssm-tech/lib.contracts-spec-core

Declared capabilities

Lib Graphql Federation

Pothos federation helpers and subgraph schema export utilities

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