awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
hayes avatar

hayes/pothos

0
View on GitHub↗
2,576 stars·179 forks·TypeScript·isc·29 viewspothos-graphql.dev↗

Pothos

Pothos is a code-first GraphQL schema builder and framework designed for type-safe development. It allows developers to construct schemas using typed definitions in TypeScript, eliminating the need for external code generation steps.

The framework distinguishes itself through a dedicated data mapper that connects GraphQL types to relational databases and ORMs, such as Prisma, while optimizing query resolution. It provides a full implementation of the Relay specification, including global object identification and cursor-based pagination.

The project covers several core capability areas, including a granular authorization framework for field-level access control and a performance optimization suite that utilizes request batching and data-fetching plans to prevent N+1 query issues. It also includes structured error handling via union types, query complexity limiting, and tools for transforming static queries into live subscriptions.

The project provides utilities for schema-to-code conversion to facilitate migration and includes built-in support for resolver execution tracing and field mocking.

Features

  • Type-Safe API Schemas - Constructs type-safe GraphQL schemas using TypeScript definitions to ensure consistency without external code generation.
  • Type-Safe Schema Construction - Implements a code-first framework for defining type-safe GraphQL schemas directly in TypeScript.
  • Column Selection Optimizations - Optimizes performance by ensuring only the specifically requested columns are fetched from the database.
  • Database Record Querying - Provides mechanisms to retrieve database records while merging GraphQL field selections directly into the underlying database query.
  • Database Relationship Mappings - Maps relational database associations to GraphQL fields with integrated support for filtering, ordering, and argument-based parameters.
  • GraphQL Data Mappers - Implements a dedicated data mapper to connect GraphQL types to relational databases and ORMs with optimized resolution.
  • Object-Relational Mapping - Provides a data mapper that connects GraphQL object types to relational database tables and ORM models like Prisma.
  • Object-Relational Mapping Models - Maps Prisma database models to GraphQL object types and optimizes relation resolution to prevent performance issues.
  • Cursor-Based Pagination - Defines connection and edge types supporting offset, array, and cursor-based pagination for large datasets.
  • Query Planning - Replaces standard resolvers with optimized data-fetching plans that merge API selections into database queries.
  • Data-Fetching Plan Execution - Replaces standard resolvers with data-fetching plans to improve query performance and eliminate redundant database calls.
  • Relational Database Integrations - Integrates with relational query builders to optimize query resolution and eliminate N+1 fetching problems.
  • Request Batching - Groups multiple individual field requests into single database operations to prevent N+1 performance issues.
  • Object Mappings - Automatically maps database table definitions to type-safe GraphQL object types with customizable field naming.
  • Context-Aware Access Control - Calculates required authorization scopes dynamically based on the parent object value or the request context.
  • Field-Level Access Controls - Enforces granular read/write authorization at the individual field and type level using dynamic scopes.
  • Scope-Based Visibility Controls - Enforces field-level authorization by calculating required permissions based on request context or parent objects.
  • Authorization Rule Composition - Combines multiple authorization requirements using logical operators to require specific scopes.
  • GraphQL Authorization Frameworks - Provides a granular authorization framework for enforcing field-level access control and scope-based permissions.
  • Fine-Grained Permission Checking - Determines access rights at runtime using scope loaders that depend on specific resources or user permissions.
  • Authorization Scope Definition - Enforces access control on queries and mutations by requiring requests to possess specific authorization scopes.
  • N+1 Query Prevention - Prevents N+1 query issues by batching data requests for nested fields.
  • GraphQL Performance Optimizers - Solves N+1 query problems and reduces database roundtrips through request batching and optimized data-fetching plans.
  • Relay Global Object Identification - Implements a Relay-compliant system that encodes type and database IDs into single opaque strings for global resolution.
  • Code-First Serialization Engines - Defines the GraphQL schema directly on application types using TypeScript, eliminating the need for external schema files.
  • Global Object Identifiers - Implements globally unique IDs for types with utilities to encode, decode, and resolve them for direct retrieval.
  • Type Definitions - Implements type-safe definitions for the shape and structure of data objects within the GraphQL schema.
  • GraphQL Schema Generation - Acts as a code-first framework for defining and generating type-safe GraphQL schemas.
  • Relay Mutation Generation - Generates mutation fields along with required input and payload objects, including standard client mutation identifiers.
  • Relay Specification Implementations - Defines object types that implement a global interface to fetch single or multiple nodes by their unique identifiers.
  • Input Validation - Checks GraphQL field arguments and input objects using schema-based libraries to ensure data conforms to constraints.
  • Relationship Aggregators - Calculates derived statistical summaries, such as counts or sums, from data relationships without loading full records.
  • API Type Variants - Supports defining multiple distinct object types from a single data source to represent different roles or views.
  • Query-to-Stream Adapters - Transforms static GraphQL queries into live data streams using triggers that push updates upon data changes.
  • Real-time Data Subscriptions - Transforms static queries into live data streams by registering triggers that push updates when data changes.
  • Input Validation Schemas - Verifies the format and constraints of GraphQL input data using schema-based validation before processing.
  • Partial List Error Handling - Wraps individual list elements in union types to support partial failures where some items return data and others return errors.
  • GraphQL Error Formats - Implements structured error responses using union types to provide type-safe feedback for partial failures.
  • Custom Error Type Definitions - Constructs union types containing success and error shapes to provide granular, type-safe control over field return values.
  • Error to Value Wrapping - Wraps resolver results in sum types that automatically resolve to error objects when exceptions are thrown.
  • Query Complexity Calculators - Calculates the total cost of queries based on multipliers and arguments to reject requests that exceed resource limits.
  • API Schema Subset Generation - Generates multiple variations of a single schema to expose different fields and types for public and internal consumers.
  • Union Types - Uses GraphQL union types to return structured error objects instead of throwing top-level exceptions.
  • GraphQL Sub-Graph Partitioning - Allows splitting a single schema into multiple subsets to share logic between public and internal API endpoints.
  • Schema-Integrated Error Types - Incorporates dedicated error types directly into the GraphQL schema and links them to the underlying resolver logic.
  • Type Safety and Schema Construction - Plugin based GraphQL schema builder for TypeScript.

Star history

Star history chart for hayes/pothosStar history chart for hayes/pothos

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does hayes/pothos do?

Pothos is a code-first GraphQL schema builder and framework designed for type-safe development. It allows developers to construct schemas using typed definitions in TypeScript, eliminating the need for external code generation steps.

What are the main features of hayes/pothos?

The main features of hayes/pothos are: Type-Safe API Schemas, Type-Safe Schema Construction, Column Selection Optimizations, Database Record Querying, Database Relationship Mappings, GraphQL Data Mappers, Object-Relational Mapping, Object-Relational Mapping Models.

Which projects share features with hayes/pothos?

Projects with overlapping indexed features include: rmosolgo/graphql-ruby — GraphQL-Ruby is a Ruby library for building GraphQL APIs with a strongly typed schema and a dedicated query execution… strawberry-graphql/strawberry — Strawberry is a type-safe GraphQL library for Python that enables the design of schemas using Python type annotations… graphql-python/graphene-django — Graphene-Django is a GraphQL integration framework and schema mapper used to build typed APIs for Django applications.… cerbos/cerbos — Cerbos is an open-source authorization service that provides a centralized, language-agnostic engine for managing… vincit/objection.js — Objection.js is an object-relational mapper for Node.js that maps SQL database tables to classes and rows to model… miguelgrinberg/microblog — This project is a social blogging application built with Flask. It provides a platform for user account management,…

Projects sharing features with Pothos

These projects share indexed features with Pothos. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • rmosolgo/graphql-rubyrmosolgo avatar

    rmosolgo/graphql-ruby

    5,448View on GitHub↗

    GraphQL-Ruby is a Ruby library for building GraphQL APIs with a strongly typed schema and a dedicated query execution engine. It provides a comprehensive framework for mapping application objects to a formal type system, enabling structured data fetching through defined resolvers. The project distinguishes itself with advanced performance and delivery mechanisms, including a data loader for batching and caching to prevent N+1 query patterns. It supports high-performance data delivery through incremental response streaming, deferred query responses, and parallel data fetching using fibers. Add

    Ruby
    View on GitHub↗5,448
  • strawberry-graphql/strawberrystrawberry-graphql avatar

    strawberry-graphql/strawberry

    4,674View on GitHub↗

    Strawberry is a type-safe GraphQL library for Python that enables the design of schemas using Python type annotations and dataclasses. It functions as an asynchronous GraphQL server and execution engine, providing a bridge to expose schemas across ASGI-compliant web frameworks such as FastAPI, Django, Flask, and Litestar. The project implements GraphQL Federation, allowing for the creation of distributed schemas and entities that merge into a unified supergraph across multiple services. It also includes a dedicated toolkit for the Relay specification, supporting global object identification a

    Pythonasgiasynciodjango
    View on GitHub↗4,674
  • graphql-python/graphene-djangographql-python avatar

    graphql-python/graphene-django

    4,390View on GitHub↗

    Graphene-Django is a GraphQL integration framework and schema mapper used to build typed APIs for Django applications. It functions as a database API layer that transforms Django model fields and relationships into a graph schema, allowing clients to request specific data in a single call. The project implements the Relay specification, providing tools for global object identification and standardized connection-based pagination to manage large datasets. It distinguishes itself by mapping database models, forms, and serializers directly into GraphQL object types and mutations. The framework

    Python
    View on GitHub↗4,390
  • cerbos/cerboscerbos avatar

    cerbos/cerbos

    4,460View on GitHub↗

    Cerbos is an open-source authorization service that provides a centralized, language-agnostic engine for managing access control. It functions as a policy-as-code platform, allowing teams to define, test, and distribute authorization rules using declarative YAML or JSON configurations. By decoupling access logic from application code, it enables consistent permission enforcement across diverse service stacks. The project distinguishes itself through its ability to translate high-level authorization policies into native database query filters. This capability allows applications to enforce sec

    Goaccess-controlauthorizationgo
    View on GitHub↗4,460
Compare all 30 related projects→