PostGraphile Instant GraphQL API


Instantly spin-up a GraphQL API server by pointing PostGraphile at your existing PostgreSQL database

Try it now:
npx postgraphile -c my_db --watch
requires Node.js 8.6 or higher

If your database is on another machine, you may pass a connection string in place of my_db. Connection strings have the form:

postgres://pg_user:[email protected]_host:pg_port/pg_db?ssl=1

Rapidly develop lightning-fast powerful applications

PostGraphile automatically detects tables, columns, indexes, relationships, views, types, functions, comments, and more — providing a GraphQL server that is highly intelligent about your data, and that automatically updates itself without restarting when you modify your database.
  • Strong PostgreSQL support
  • GraphQL best practices
  • Simple to deploy and scale
  • Highly customisable
  • Impressively high performance
  • Granular authorisation via RLS
  • Open source under MIT license
  • Powerful plugin system

What people are saying

Chad F
senior technical lead

 Thanks for making GraphQL something I can use on my project in a robust way with minimal effort. 500-1500 requests per second on a single server is pretty awesome. 

Sam L
full stack developer

 This project, Benjie's handling of it, the docs, support, and community is awesome all around. PostGraphile is a powerful, idomatic, and elegant tool. 

Max D
software consultant

 Recently I launched a few mobile and web apps using GraphQL, Great stuff, not least thanks to wonderful PostGraphile and Apollo. At this point, it’s quite hard for me to come back and enjoy working with REST. 

Bradley A
CTO

 I setup my backend to use PostGraphile directly when querying the local database. It's removed a bunch of hand-written SQL, added type-safety to verify Postgres schema compatibility, and created a more consistent dev experience for frontend/backend code. 

Steven M
VP engineering

 Our company is under going a technology shift to use more a more modern stack. A large piece of this shift is our desire to use a GraphQL interface to our Postgres server. After researchiing we decided to try PostGraphile from the graphile.org site and we couldn't be happier. It's very expansive and configurable and the maintainers are available to ask questions and it's nice to see such an active group fixing bugs and adding enhancements. We're very happy with our choice! 

Keep up to date on Graphile Engine and PostGraphile features/changes. Subscribe to our occasional announcements newsletter:

  • Client-facing GraphQL server

    No need for complex server architectures, containers, etc: PostGraphile is pure Node.js and can be embedded in your existing Node.js project

  • Server-side rendering

    Issue requests to your PostGraphile API without network roundtrips, fantastic for React SSR

  • Hot-reloading GraphQL API

    Automatically re-generate the GraphQL schema when your database changes when you're using --watch

  • Lightning fast

    Much faster performance than even a hand-rolled GraphQL schema using DataLoader

  • No N+1 problem

    PostGraphile compiles a query tree of any depth into a single SQL statement, resulting in extremely efficient execution

  • Auto-generated documentation

    Database comments are exported to GraphQL and browsable via the built in PostGraphiQL IDE

  • GraphQL best practices

    Including: cursor pagination, global object identification, and Relay mutations

  • Super secure

    Implement authorization via PostgreSQL's RBAC and Row-Level Security features, get full-stack security you can trust

  • Respects database permissions

    Tables and columns that you don't GRANT access to will not be exported via GraphQL when using --no-ignore-rbac

  • Customisable with SQL

    Excellent PostgreSQL function support, mapping to custom queries, custom mutations and computed columns

  • Customisable via smart-comments

    Refine your GraphQL schema with smart comments: rename, omit, enhance with a simple COMMENT

  • Customisable via JS

    PostGraphile is built from a large number of plugins; get the exact API you desire by replacing or removing existing plugins, building your own with our helpers, or selecting from community plugins

  • Fully GraphQL compatible

    We use the reference GraphQL implementation under the hood, so you know we're spec compliant