PostGraphile v4.0.0
After many months of development, testing and iteration it is my great pleasure to announce that PostGraphile v4 is officially available! All PostGraphile and PostGraphQL users are recommended to update to this version at their earliest convenience. A migration guide is available for PostGraphQL (v3), most users should find the upgrade fairly painless. A full feature guide is available detailing the various enhancements incorporated into PostGraphile v4.
A lot has changed in PostGraphile v4 (though it's still broadly compatible with version 3); here are some of the features I'm most excited about:
- Incredible performance gains - up to 55× more requests per second, up to 92% RAM usage reduction, and up to 94% reduction in request latency
- Much tidier GraphQL schemas
- PostgreSQL extension resources omitted by default
- with
--no-ignore-rbac
, types and fields you cannot access (according to PostgreSQL GRANTs) are removed automatically - new smart comments feature enables you to manually omit tables, columns and functions you don't want in your GraphQL schema (alternatively rename or deprecate them)
- Plugins plugins plugins!
- The entire PostGraphile schema is now generated from plugins
- You can add, remove or replace plugins
- We've written some helpers for common plugin desires:
- Mix new features into your GraphQL schema easily with makeExtendSchemaPlugin
- Change how things are named with makeAddInflectorsPlugin
- Enhance your schema's functionality with some of the community's plugins, including new powerful filtering capabilities
- Massively improved error messages (please file issues if you think we can improve these further!)
- Cleaner support for one-to-one relationships
- GraphQL query batching
The biggest change in v4 is that the entire GraphQL schema generation has been re-built from the ground up to be both highly performant and highly customisable. This has been enabled with the help of the plugin-based Graphile GraphQL Engine. A few members of the community have already written some interesting plugins for PostGraphile, and we're keen to see what others come up with in the coming months!
We've also fixed a huge number of issues that affected V3, updated various dependencies, added support for PG10 features and PG11, added support for query batching, added support for a cluster mode to better make use of your many server cores, added simplified collections so you can bypass edges/nodes if you want to, greatly improved support for PostgreSQL functions, made watch mode even more reliable and useful, added a --no-server
option for schema export scripts, added cache functionality to skip database introspection on startup, configuration file support, better support for common environmental variables, bundled TypeScript typings and much much more!