A set of RFC 3339 compliant date/time GraphQL scalar types (Date, Time, DateTime) for use with graphql-js. Version 3.6.1 is the latest stable release. The library has a slow release cadence with few updates. It provides simple ISO 8601 parsing and serialization, unlike graphql-scalars which offers a broader set.
npm install graphql-iso-dateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a GraphQL schema with three scalar fields (Date, Time, DateTime) using graphql-iso-date and executes a query.
Ensure your resolvers provide UTC values or manually convert.
Validate input strings before passing to resolvers.
Convert timestamps to Date objects before returning.
Use graphql ^14.0.0 or ^0.13.0, or migrate to graphql-scalars package for broader compatibility.
Ensure graphql peer dependency is within supported range: ^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0
Return a Date object, a valid RFC 3339 date-time string, or a Unix timestamp (number) for DateTime.
Validate input dates before passing to GraphQL, or ensure they are real calendar dates.