# graphql-hive/graphql-scalars

A library of custom GraphQL Scalars for creating precise type-safe GraphQL schemas.

Repository: https://github.com/graphql-hive/graphql-scalars
Canonical: https://ross.abutalabs.com/products/graphql-scalars
Homepage: https://www.the-guild.dev/graphql/scalars
Language: TypeScript
License: MIT
License Family: permissive
Topics: graphql, graphql-js, schema, scalar-types
Last push: 2026-08-20T09:36:37+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 86, longevity 100
- inputs: {"age_days": 3365, "days_push": 13, "days_rel": 13, "gap_med": 62, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1930, forks 141 (observed 2026-08-28T04:05:56.119915+00:00)

## What it is
A TypeScript library of custom GraphQL scalar types (e.g., DateTime, EmailAddress, UUID, BigInt, URL) for building precise, type-safe GraphQL schemas. It works with any graphql-js-based server such as Apollo Server and GraphQL-Yoga.

## Use cases
- validate email addresses in a graphql schema
- add datetime scalar to graphql api
- use bigint in graphql schema
- enforce uuid format in graphql field
- create type-safe graphql schema with custom scalars
- generate custom scalar from regex in graphql

## When to choose
- you need well-tested, standardized scalar types for a graphql-js-based server
- you want input validation at the schema level instead of resolver code
- you need scalars like DateTime, EmailAddress, URL, or JSON across Apollo Server or GraphQL-Yoga

## When to avoid
- your server is not built on graphql-js (e.g., some non-JS runtimes)
- you only need one or two trivial scalars that are easy to define inline
- you need scalars for a non-GraphQL API style like REST

## Facets
- artifact type: library
- maturity: stable
- function: graphql, form-handling, serialization, type-system
- domain: web-development, apis, backend, developer-tools
- platform: cross-platform
- tags: graphql-scalars, schema-design, type-safety, the-guild, typescript, nodejs, web-server

## Member repositories
- graphql-hive/graphql-scalars (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:56.119915+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:08:47.387757+00:00, confidence not recorded.
  - readme: https://github.com/graphql-hive/graphql-scalars (fetched 2026-08-28T04:05:56.119915+00:00, sha 4dc5ffce179c)
  - homepage: https://www.the-guild.dev/graphql/scalars (fetched 2026-08-29T10:48:43.731166+00:00, sha d6a1f6d8a8aa)
  - site_page: https://the-guild.dev/graphql/scalars/docs (fetched 2026-08-29T10:48:43.743143+00:00, sha b39d00cc47cf)
  - site_page: https://the-guild.dev/about-us (fetched 2026-08-29T10:48:43.745401+00:00, sha 4c4f11519fb9)
  - site_page: https://the-guild.dev/graphql/scalars/docs/quick-start (fetched 2026-08-29T10:48:43.747415+00:00, sha 9fc7a9287f78)
  - site_page: https://the-guild.dev/graphql/scalars/docs/scalars/account-number (fetched 2026-08-29T10:48:43.749280+00:00, sha a781a09eaa42)
  - site_page: https://the-guild.dev/graphql/scalars/docs/scalars/big-int (fetched 2026-08-29T10:48:43.751022+00:00, sha 793f5824cc14)
  - site_page: https://the-guild.dev/graphql/scalars/docs/scalars/byte (fetched 2026-08-29T10:48:43.752697+00:00, sha 806259eca4e7)
  - site_page: https://the-guild.dev/graphql/scalars/docs/scalars/country-code (fetched 2026-08-29T10:48:43.754863+00:00, sha 024006291471)
  - site_page: https://the-guild.dev/graphql/scalars/changelog (fetched 2026-08-29T10:48:43.740639+00:00, sha 73b905e3152d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
