npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stackables/bridge

v2.3.3

Published

Declarative dataflow for GraphQL

Downloads

4,894

Readme

github

The Bridge

Declarative dataflow for GraphQL. Wire data between APIs, tools, and fields using .bridge files—no resolvers, no codegen, no plumbing.

npm install @stackables/bridge

The Workflow

The Bridge doesn't replace your GraphQL schema; it implements it. You define your Types in standard GraphQL SDL, then use .bridge files to wire those types to your data sources.

1. Define your Schema

Start with a standard schema.graphql file. This is your "Interface."

type Location {
  lat: Float
  lon: Float
}

type Query {
  location(city: String!): Location
}

2. Wire the Bridge

Create your logic.bridge file to implement the resolver for that specific field. This is your "Implementation."

version 1.5

tool geo from httpCall {
  .baseUrl = "https://nominatim.openstreetmap.org"
  .path = "/search"
}

bridge Query.location {
  with geo
  with input as i
  with output as o

  # 'i.city' comes from the GraphQL argument
  # 'o.lat' maps to the 'lat' field in the Location type
  geo.q <- i.city
  o.lat <- geo[0].lat
  o.lon <- geo[0].lon
}

3. Initialize the Engine

The Bridge takes your existing schema and automatically attaches the logic.

import { bridgeTransform, parseBridge } from "@stackables/bridge";
import { createSchema } from "graphql-yoga";

const typeDefs = /* load your schema.graphql */;
const bridgeFile = /* load your logic.bridge */;

const schema = bridgeTransform(
  createSchema({ typeDefs }),
  parseBridge(bridgeFile)
);

Linting

The package ships a bridge-lint CLI to validate .bridge files from the terminal or CI.

# Lint a single file
npx bridge-lint path/to/logic.bridge

# Lint multiple files / globs
npx bridge-lint src/**/*.bridge

# Output diagnostics as JSON (for tooling / CI integration)
npx bridge-lint --json src/**/*.bridge

Exit code is 1 when any errors are present, 0 when everything is clean.


Packages

@stackables/bridge is the all-in-one — it re-exports everything so you can get started fast. But you don't always need the full stack. If you're optimizing for bundle size (say, deploying to Cloudflare Workers), pick only the packages you need:

| Package | Role | When to reach for it | | ------------------------------------------------------------------------------------------ | ------------------------ | --------------------------------------------------------------------------- | | @stackables/bridge-core | The Engine | Edge workers, serverless — run pre-compiled instructions without the parser | | @stackables/bridge-parser | The Parser | Parse .bridge files into a BridgeDocument (AST) | | @stackables/bridge-compiler | The Compiler | Compile BridgeDocument into optimized JavaScript | | @stackables/bridge-graphql | The Adapter | Wire bridge instructions into an Apollo or Yoga GraphQL schema | | @stackables/bridge-stdlib | The Standard Library | Customize or extend httpCall, string/array tools, audit, assert | | @stackables/bridge-types | Shared Types | Writing a custom tool library or framework integration |

See the Package Selection guide for common deployment patterns (JIT vs AOT).

VS Code extension: search for "The Bridge Language" in the Extensions panel for syntax highlighting, diagnostics, and hover.