github graphile/crystal v4.10.0
v4.10.0 - Framework Friends

latest releases: pgl5b21, v4.14.0, v4.13.0...
3 years ago

Pretty big release, so let's get straight to it:

Improved Framework Support

The major feature in this release is much more solid support for various Node.js webserver frameworks: Node itself, Connect, Express, Koa, Fastify (v2 and v3 🆕), and Restify 🆕. This also fixes some long-standing compatibility issues with certain Koa plugins 😉

To accomplish this we've split the middleware into separate route handlers for each of our routes, and you can either use the middleware to delegate to these (where the framework allows), or you can add the route handlers directly. You can find documentation in our library usage page and can see examples in our new server examples folder: https://github.com/graphile/postgraphile/tree/v4/examples/servers

Along with this we get some new server hooks that you can use in place of (or in addition to) postgraphile:http:handler that are only called on the relevant routes: postgraphile:http:eventStreamRouteHandler, postgraphile:http:faviconRouteHandler, postgraphile:http:graphiqlRouteHandler and postgraphile:http:graphqlRouteHandler.

Upgraded PostGraphiQL

We've upgraded GraphiQL and GraphiQL Explorer.

With the GraphiQL upgrade we now get a dedicated headers editor panel next to the variables editor, so no more hacky sidebar 🎉 It also adds new "Merge Query" and "Copy Query" buttons to the enhanced GraphiQL which may ease you development or debugging flows.

GraphiQL Explorer is now smoother and better looking.

@eddiewang also added the ability to configure credentials for GraphiQL.

Screenshot_20201030_170602

Thank you

PostGraphile wouldn't be where it is today without the support of the community; as always I want to say a huge THANK YOU to all our sponsors and contributors that make this possible.

GraphQL v15

I've had many (many) requests for GraphQL v15 compatibility; this has finally been added. You should review the GraphQL v15 changes for yourself, and if you deem them to be breaking for your workflows then you should pin GraphQL v14 in your projects which PostGraphile continues to support.

Domain constrained composite types

@jcgsville has added a tweak so that domain constrained composite types (CREATE DOMAIN my_domain AS my_composite_type ..., where my_composite_type is a type with multiple attributes) are now supported.

MaxListenersExceededWarning fix

If you've ever been greeted with:

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 graphql:... listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit

because you use @graphile/pg-pubsub, you can now opt-out of this by passing a sufficiently large subscriptionEventEmitterMaxListeners option to PostGraphile. Thanks @xvaara!

Features

PostgreSQL schema review

If you'd like to give your schema a checkup right now, take pgRITA for a spin! We also offer one-on-one consultancy over Zoom screen sharing; if that's of interest you can book a call at https://benjie.dev or email jem @ our website domain (there's no www 😉) to enquire as to other options. Thanks for your support!

Don't miss a new crystal release

NewReleases is sending notifications on new releases.