qmetrics.net

GraphQL Scalars

Custom GraphQL scalar types beyond the five built-in ones

GraphQL Scalars screenshot

GraphQL Scalars is a library of validated scalar types for dates, identifiers, formats, and units. Each scalar includes resolvers, mocks, and TypeScript definitions for schema authors.

Overview

GraphQL Scalars extends the default GraphQL type system with a large catalog of custom scalar types. Where base GraphQL only provides a handful of scalars, this library adds dozens of precise types for common domains such as dates, emails, and structured identifiers.

Every scalar validates values on input and output so resolvers receive data that already matches the declared format. Scalars ship with type definitions, resolver implementations, mock generators for testing, and TypeScript types for code generation workflows.

You import the definition and resolver for each scalar and add them to a schema built with graphql-js compatible servers. Documentation describes setup with Apollo Server, GraphQL Yoga, Mercurius, GraphQL Tools, and similar stacks.

The library is maintained as part of The Guild’s Hive ecosystem and absorbed the earlier ok-grow scalar package. It is intended as a shared dependency rather than a standalone service.

Key features

  • Large catalog of custom scalar types
  • Input and output validation per scalar
  • Mocks for each scalar
  • TypeScript types for codegen
  • Works with graphql-js servers
  • Type definitions bundled with resolvers
  • Usage guides for major servers
  • Maintained by The Guild

Use cases

  • Type-safe dates and emails in GraphQL
  • Reducing hand-written scalar validation
  • Test data generation with scalar mocks
  • Codegen-friendly GraphQL schemas
  • Extending schemas beyond built-in scalars

Tags

Similar software

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

OkHttp

HTTP client for JVM, Android, and GraalVM

OkHttp is an HTTP client library tuned for efficient networking on Android, Java, and GraalVM native images. It offers synchronous and asynchronous call APIs with a fluent request builder.

★ 47.1k⟳ yesterdayApache-2.0
Frameworks & PlatformsDesktop/CLI app

gRPC

Cross-language remote procedure call framework

gRPC is an RPC framework that lets client and server programs communicate transparently and supports building connected, multi-language systems.

★ 45.5k⟳ todayApache-2.0

tRPC

End-to-end typesafe TypeScript APIs without code generation

tRPC helps teams define server procedures and call them from clients with full TypeScript types for inputs, outputs, and errors—no schemas or codegen step.

★ 40.9k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

go-zero

Cloud-native Go microservices and RPC framework

go-zero is a Go web and RPC framework with code generation, built-in resilience middleware, and tooling aimed at stable high-traffic services.

★ 33.5k⟳ 9 days agoMIT