A library of custom GraphQL scalar types for creating precise, type-safe GraphQL schemas.
GraphQL Scalars is a library that provides a wide range of custom scalar types for GraphQL schemas. It solves the problem of GraphQL's limited built-in scalar types by offering specialized scalars for common data formats like emails, URLs, dates, and JSON, enabling more precise and type-safe API definitions.
GraphQL API developers and teams who need to enforce data validation and type safety at the schema level, particularly those building APIs with domain-specific data requirements.
Developers choose GraphQL Scalars because it offers a battle-tested collection of scalars that integrate seamlessly with GraphQL, reducing boilerplate validation code and ensuring consistent data handling across the API.
A library of custom GraphQL Scalars for creating precise type-safe GraphQL schemas.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides built-in Email and URL scalars that automatically validate format, reducing the need for manual validation code in resolvers or clients.
The DateTime scalar ensures precise date and time handling with ISO 8601 compliance, as highlighted in the key features for consistent API data.
Includes a JSON scalar for passing arbitrary JSON objects through GraphQL, enabling complex data structures without bloating the schema with custom types.
Offers a NonEmptyString scalar to guarantee strings are not empty at the schema level, adding validation without additional middleware.
Full documentation is hosted separately on graphql-scalars.dev, which can be less accessible than inline docs and might lag behind library updates.
Integrating multiple scalars requires manual addition to the GraphQL schema, which can be verbose and error-prone for large or complex schemas.
While comprehensive, the library doesn't cover all scalar needs, and creating custom scalars isn't as streamlined as using the provided ones, requiring extra boilerplate.