graphql-scalar
JSON →graphql-scalar v0.1.0 is a TypeScript library for creating configurable custom GraphQL scalars with built-in sanitization, validation, and transformation. It provides factory functions like createStringScalar, createIntScalar, and createFloatScalar that accept options for constraints (min/max length, pattern, numeric range) and hooks (coerce, parse, sanitize, serialize, validate). The package ships with type declarations and has peer dependencies on graphql and tslib (^1.10.0). It supersedes older packages (graphql-input-number, graphql-input-string) with breaking changes. Release cadence is low; no recent updates. Key differentiators include TypeScript first-class support and a unified API for creating scalars with common patterns. Note: tslib peer dependency may cause issues with TypeScript projects using importHelpers.