Instantly spin-up a GraphQL API server by pointing PostGraphile at your existing PostgreSQL database
npx postgraphile -c my_db --watch
If your database is on another machine, you may pass a connection string in place of my_db. Connection strings have the form:
Rapidly develop lightning-fast powerful applicationsPostGraphile 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
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.
This project, Benjie's handling of it, the docs, support, and community is awesome all around. PostGraphile is a powerful, idomatic, and elegant tool.
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.
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.
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!
- 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
- Lightning fast
Much faster performance than even a hand-rolled GraphQL schema using
- 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
- 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
GRANTaccess to will not be exported via GraphQL when using
- Customisable with SQL
- Customisable via smart-comments
Refine your GraphQL schema with smart comments: rename, omit, enhance with a simple
- 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