$ account graphql-hive
GraphQL Yoga is a production-ready GraphQL server framework built on the Web Fetch API, designed to run on Node.js, Deno, Bun, Cloudflare Workers, and other serverless platforms. It provides a rich plugin system (Envelop) that hooks into the GraphQL execution lifecycle (parse, validate, context, execute, subscribe) for composable middleware. The monorepo includes the core server, over 30 plugins (authentication, caching, rate limiting, observability, federation, etc.), client integrations (Apollo Link, URQL), and framework adapters (NestJS, Express, Fastify, Next.js, SvelteKit, etc.). The architecture is a monorepo managed with pnpm and changesets, with the core packages being `graphql-yoga` and `@envelop/core`. Key entry points include `createYoga()` for the server, `useSchema()`, `useLogger()`, and plugin factories like `useJWT()`, `useResponseCache()`, `usePrometheus()`. Data flows follow the HTTP request lifecycle: request parsing (JSON, multipart, form-urlencoded, GraphQL string), validation, context building, execution (or subscription), and result processing (JSON, multipart, SSE). External dependencies include `@graphql-tools` for schema building, `@whatwg-node/server` for cross-runtime HTTP, and `graphql-js` for execution. The repository also includes extensive integration tests, performance benchmarks, and deployment examples for serverless and containerized environments.
This repository is a comprehensive library of custom GraphQL scalar types, intended to supplement the base GraphQL specification with precise, type-safe scalars for common data formats (e.g., UUID, DateTime, EmailAddress, PhoneNumber, IBAN, GeoJSON, ISBN, etc.). It exports over 80 scalar definitions as `GraphQLScalarType` instances, along with corresponding SDL type definitions, mock generators, and JSON Schema extensions. The architecture is clean and uniform: each scalar is implemented as a self-contained module with `serialize`, `parseValue`, and `parseLiteral` methods, leveraging a shared validation pattern via `createGraphQLError`. The library integrates seamlessly with GraphQL codegen via `extensions.codegenScalarType` and provides a `RegularExpression` factory for creating custom regex-based scalars. Production usage is as a dependency for GraphQL servers (Apollo, Yoga, etc.) where precise input validation and output formatting are required. The codebase is well-tested with per-scalar unit tests, integration tests for date/time scalars, and bundle-size checks. While the majority of scalars are simple regex or range validations, several modules (GeoJSON, IBAN, iso-date) demonstrate non-trivial validation logic and are safely reusable. The repository also includes a Next.js documentation website and automated release tooling via Changesets.