graphql-type
JSON →graphql-type v1.1.1 is a GraphQL type creation helper that provides functions to quickly define GraphQL scalar types with built-in validation for strings, integers, and floats. It supports bi-directional validation (input and output) as well as uni-directional (input-only or output-only). Key features include min/max length, regex, custom test functions, and custom error messages for strings; min/max and test for integers; plus maxDecimals for floats. Compared to manually creating custom scalars with GraphQL's GraphQLScalarType, graphql-type offers a simpler API and consistent validation patterns. Released under MIT license, the package is stable but has not seen updates since 2018, suggesting low maintenance cadence.
Resources
packagegraphql-type ↗