PostGraphile

PostGraphile

Freemium

Extensible high-performance GraphQL APIs backed by PostgreSQL.

APIs & Infrastructure
GraphQL Engines

Scores

Popularity
2/5
Learning Curve
4/5
Flexibility
4/5
Performance
5/5
Portability
4/5

About

PostGraphile generates a complete, production-ready GraphQL API directly from a PostgreSQL database schema. Point it at a Postgres connection string and it introspects the tables, views, functions, and relationships, then exposes them as a fully-typed GraphQL API — automatically handling queries, mutations, subscriptions, pagination, and filtering without a single resolver.

The v5 release (built on the Grafast planning engine) compiles GraphQL operations into highly optimised SQL, eliminating N+1 query problems and delivering throughput of 500–1500 requests per second on a single server. PostgreSQL's own RBAC and row-level security are surfaced directly as API-level access control, meaning security rules defined in the database are enforced automatically without duplicating logic in the API layer.

The plugin architecture allows deep customisation: you can extend the auto-generated schema with custom resolvers, add computed columns, expose stored procedures as mutations, and override any part of the schema or server behaviour. The Graphile ecosystem also includes Graphile Worker (a PostgreSQL-backed job queue) and Graphile Migrate (a migration tool), making it practical to build a full backend on top of PostgreSQL with minimal infrastructure.

The core library is free and MIT-licensed; a Pro plugin pack ($25/month) adds query cost protection and read-replica support for high-scale production deployments. Because all schema logic lives in the database, there is no vendor lock-in — migrating away leaves your PostgreSQL schema intact.

Key Features

  • Auto-generates full GraphQL CRUD API from PostgreSQL schema — no resolvers required
  • Grafast planning engine (v5) compiles queries to optimised SQL, eliminating N+1 problems
  • Surfaces PostgreSQL RBAC and row-level security as API-level access control
  • Real-time GraphQL subscriptions via PostgreSQL LISTEN/NOTIFY
  • Supports computed columns, stored procedures, and custom mutations via SQL functions
  • Plugin architecture for schema and server customisation without forking
  • Polymorphism support — interfaces and unions from PostgreSQL type hierarchies
  • No vendor lock-in — schema logic lives in PostgreSQL, not in PostGraphile config

Pros

  • Instantly ships a documented, typed GraphQL API from an existing database with zero boilerplate
  • Performance is exceptional — optimised SQL generation and N+1 elimination out of the box
  • Database-driven security (RLS + RBAC) means access control is defined once and enforced everywhere
  • No vendor lock-in: all logic is in PostgreSQL, so switching away is straightforward
  • Plugin ecosystem allows enterprise-grade customisation without maintaining a fork

Cons

  • Requires solid PostgreSQL knowledge — row-level security, functions, and views are central to customisation
  • Complex business logic outside the database (third-party calls, orchestration) is awkward to model
  • Schema-first approach means API design is constrained by your database structure
  • Plugin system has steep learning curve; once certain plugins are enabled they can be hard to remove
  • Community is smaller than Hasura or Apollo; fewer tutorials for advanced production patterns

Pricing

Freemium
Community (Free)Free
  • · Full PostGraphile v4 and v5 core
  • · Unlimited production use
  • · MIT-licensed open source
  • · Community Discord support
Pro (Standalone)$25/monthly
  • · Pro plugin: query cost protection
  • · Pro plugin: read-replica support
  • · Up to 4 production instances
  • · 100 development instances
Production Sponsor$100/monthly
  • · Pro plugin included
  • · Complimentary pgRITA database tool
  • · Priority community support
  • · Discounted consultancy
Private Advisor$899/monthly
  • · Pro plugin included
  • · Development support contract
  • · Discounted consultancy packages
  • · Company logo on project site

Learning Resources

No resources yet — check back soon.

Tags

Free TierWeb

Details

Maintained
Yes
Primary language
TypeScript
Domain
Graphql
GitHub stars
12.9k
Stars updated
2026-04-26