graphql-static-binding (v0.9.3, last released 2019) generates static TypeScript binding files from a GraphQL schema, enabling type-safe query construction without runtime schema introspection. It is designed for use with graphql-tools and the static binding pattern popularized by Prisma. The package requires graphql ^0.11.0-0.13.0 and has not seen updates in years; users should consider alternatives like GraphQL Code Generator.
npm install graphql-static-bindingNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates a static binding object from a schema, allowing type-safe query string construction with arguments and selection set.
Downgrade graphql to ^0.13.0 or use an alternative library like graphql-code-generator.
Migrate to GraphQL Code Generator or other modern tools.
Re-generate bindings whenever the schema changes.
Call generateBinding(schema) without new.
Install graphql@0.13.0: npm install graphql@0.13.0
Ensure schema is built with makeExecutableSchema and contains valid type definitions.
Use graphql@0.13.0 or switch to an alternative.