github graphile/crystal v4.0.0-rc.4
RC4: GraphQL 0.13.x, improved TypeScript support

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

A recent influx of Patreon support has enabled me to spend an extra day on PostGraphile this month, so this release contains more enhancements than expected! Thanks so much, Patreon supporters!

The biggest change in this release is to the TypeScript support - if you use PostGraphile in a TypeScript project then please remove any custom declarations you may have written for postgraphile, postgraphile-core, graphile-build, graphile-build-pg, graphile-utils, pg-sql2 and graphql-parse-resolve-info - all of these now come with their own built in TypeScript type definitions! 🎊

  • GraphQL 0.13.x support! 🎉 (We were limited to 0.12.x before) - this should hopefully help people get started a lot easier due to fewer graphql module conflicts!

  • Better TypeScript support

    • We export more types for you to use
    • postgraphile-core, graphile-utils and graphql-parse-resolve-info have been ported to TypeScript
    • graphile-build and graphile-build-pg now export .d.ts files so they should automatically work with TypeScript (ultimately we plan to move these to TypeScript too)
    • Note TypeScript support is currently experimental - please get in touch if you have any TypeScript woes!
  • graphile-utils enhancements

    • enum support thanks to @bradleyayers
    • newly added fields can require that other columns on the parent table are fetched via @requires(columns: [...]) directive
  • support for a couple more PG types:

    • hstore support
    • inet support thanks to @syndesis
  • More information in some places for plugins to use

    • jwtClaims is now available on the GraphQL context, so your plugins can reference them (thanks to @hyperparsa)
    • nested QueryBuilder instances now have a reference to parentQueryBuilder
  • Better errors in a number of places

  • Improved CLI documentation / messages

  • Smart comments:

    • now lets you replace the GraphQL description on foreign key constraints: comment on constraint person_secret_person_id_fkey on c.person_secret is E'@forwardDescription The `Person` this `PersonSecret` belongs to.\n@backwardDescription This `Person`''s `PersonSecret`.';
    • lets you set a unique key for views, which enables more efficient cursor pagination
  • Many fixes, including:

    • enable update/delete mutations for tables lacking primary keys but which have unique constraints (note that a unique index is not sufficient, it must be a unique constraint)
    • fix bug in introspection query that could in some very rare circumstances cause tables or functions to be omitted from the generated schema
    • fixing a template string that accidentally had straight quotes (thanks @mathroc)
    • more useful error message when using legacy graphql versions with graphile-utils
    • fix bug in regex for validating long aliases
    • --watch mode now watches more things
    • --body-size-limit option now applies to all body types (previously they defaulted to 100kB across the board, and only JSON was overridden with this option)
  • We now accept the X-Apollo-Tracing header which means you should be able to use hosted GraphQL Playground with a PostGraphile schema (this was causing CORS issues before)

Don't miss a new crystal release

NewReleases is sending notifications on new releases.