PostGraphile Releases Version 4.8 - Excellent Enums
Announced 2020-08-05 by the Graphile Team
Graphile is pleased to announce the release of PostGraphile version 4.8.0, an upgrade recommended for all PostGraphile users, which introduces support for enum tables and geometric types.
Enum Tables
PostGraphile now supports "enum tables"; we have previously recommended against using PostgreSQL enums if the enums are ever likely to change after creation. This is because PostgreSQL enums cannot be added to within a transaction, and cannot ever have a value removed.
Instead, we recommend creating a table where the enum value is the primary key, and use foreign key constraints to reference this value.
This functionality is now written inside of PostGraphile. This means you may
need to revisit your database permissions if you wish to use this functionality
— don't worry, it only queries the table if it sees the @enum
smart comment.
An enum table must have a text (or varchar / char) primary key, and may have
other columns. It must be done through using an @enum
smart comment (and not a
smart tag file or plugin) due to the way in which PostGraphile v4's
introspection engine works. See
our documentation for more information,
or the detailed
technical release notes.
All new features
- Add support for "enum tables" (GitHub link)
- Add support for geometric types (GitHub link)
- Warn early if placeholders will be exhausted (GitHub link)
@pgSubscription
directive now supports initial events (GitHub link), thank you to @enisdenjo
Further details and full list of fixes in the technical release notes.
The Graphile suite of tools
PostGraphile is just one in a suite of Graphile developer tools. Graphile Worker is a job queue for Postgres running on Node, and Graphile Migrate is an opinionated, SQL-powered, productive roll-forward migration tool for Postgres. In true Graphile style, these tools are simple, familiar, fully functional and fast. Worker, in particular, pairs beautifully with PostGraphile projects, and is currently downloaded over 15k times per week! Together, these projects can give you the building blocks you need to make powerful and performant software quickly and efficiently.
Graphile Starter is a "batteries included" off-the-shelf starter project marrying these tools together with a design system, user and session management and so much more; ready for you to take as a jumping-off point for your own project. You can see our entire suite of projects at our homepage.
Thank you Sponsors!
Dear Sponsors: we love you! Thank you so much for continuing to support us during these difficult pandemic times, the progress of the Graphile projects — and of course the development of Version 5 — would not be possible without your support ❤️
PostGraphile Development: work on Version 5 is underway, for more details
see the #dev-postgraphile
channel on our Discord: https://discord.gg/graphile
Full release notes
Full detailed technical release notes can be found on GitHub: