GraphQL binding is a library for creating modular building blocks that embed existing GraphQL APIs into your own GraphQL server. It allows you to turn parts of GraphQL APIs into reusable components, supporting JavaScript, TypeScript, and Flow. Current stable version is 2.5.2, with irregular releases. Key differentiators: enables composition and reuse of GraphQL APIs, integrates with Prisma and other services. Note: the library is in maintenance mode; consider using modern alternatives like graphql-codegen or built-in federation.
npm install graphql-bindingNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a binding from a GraphQL schema string and uses it to query a user.
Migrate to graphql-codegen (https://graphql-code-generator.com) or Apollo Federation.
Update constructor to pass schema as string or DocumentNode.
Update hook signatures to (delegate: DelegateFunction) => void.
Use const { Binding } = require('graphql-binding');Use TypeScript and configure bundler to handle .ts files.
Run npm install graphql-binding or yarn add graphql-binding
Use const { Binding } = require('graphql-binding'); or import { Binding } from 'graphql-binding';Ensure you destructure Binding: const { Binding } = require('graphql-binding');No dependency data recorded yet.