Help Us Keep Making Open Source!
Join the ranks of our awesome sponsors so we can spend more time developing and advancing the software your business/charity/side-project depends on. 💖
Private Advisor: have Benjie join your company's Slack and GitHub organizations and answer your questions privately with this new sponsorship tier.
pgRITA is a new service from Graphile: it scans your databases and lets you know of any issues it finds. Set it up on your CI today, free, and never risk forgetting to enable row-level security on a table!
Bug Fixes
- 🚨 BREAKING FIX: root level custom query connection fields now nullable (#653) (131c6ac)
- types: update next function for Express compatability (#1343) (0420c95) (thanks @purge)
🚨 The above "breaking fix" will affect you if you have any custom queries that return SETOF
and result in a connection. These should always have been nullable according to our documentation and GraphQL best practices, however they were incorrectly marked as non-nullable. This has been fixed, but it means you may now receive field-level nulls where previously the entire operation would have been invalidated if an error occurs, so you may need to adjust your code to match. If you're using graphql-code-generator, like in Graphile Starter, then tracking these down should be just a case of working through the TypeScript errors, replacing data?.myFunction.nodes
with data?.myFunction?.nodes
(and similar for edges
, pageInfo
, totalCount
and any other fields you have on connections).
For details of how to opt-out of this breaking fix and why it's not treated as a semver-major change, please see #653.
Enhancements
- allow overriding init fail handling (#1342) (b06142a)
- intervals now return zeros instead of nulls (#656) (2739f79)
- improve error when cannot read from enum table (#651) (dbafe55)
- add UUID validation so errors are raised earlier (#652) (9265262)
- upgraded a load of dependencies
If you run multiple PostGraphile instances in one Node instance, this first enhancement might be something you've been hoping for for a while. It gives you a way to handle "fatal errors" that occur whilst building the initial GraphQL schema; you can specify a callback that gets called in these cases and choose how to handle it: exit the process, retry after a custom delay, give up and unmount this instance. For more details, see #1342.
Another common request is previously interval types returned null
for fields that weren't used in the interval:
{
"days": null,
"hours": null,
"minutes": null,
"months": null,
"seconds": 12,
"years": null,
}
In 4.9.0 we now use zeros instead (as you'd probably expect), thanks to an update to the postgres-interval
module:
{
"days": 0,
"hours": 0,
"minutes": 0,
"months": 0,
"seconds": 12,
"years": 0,
}
Thanks Sponsors!
We love you 💖