github graphile/crystal v4.0.0-beta.10
Ludicrous Speed!

latest releases: v4.14.0, v4.13.0, v4.12.12...
5 years ago

Huge shout out to my Patreon sponsors - your support means the world to me!


Ludicrous Speed

I've massively increased the performance of PostGraphile - especially for trivially small queries. See the link for a detailed analysis, but TL;DR: on a Digital Ocean compute-optimised droplet with 8GB of RAM (running PostGraphile, PostgreSQL and the benchmarking software all through Docker) PostGraphile running in cluster mode over 4 vCPUs can serve 550 requests per second for the following fairly complex query (lists nested 3 levels deep, plus a few individual lookups in the mix), while maintaining sub-50ms 95th percentile latency:

query {
  allAlbumsList(condition: {artistId: 127}) {
    albumId
    title
    tracksByAlbumIdList {
      trackId
      name
      genreByGenreId {
        name
      }
    }
    artistByArtistId {
      albumsByArtistIdList {
        tracksByAlbumIdList {
          mediaTypeByMediaTypeId {
            name
          }
          genreByGenreId {
            name
          }
        }
      }
    }
  }
}

We also now support simple list collections as well as Relay connections; e.g. this:

{
  allAlbumsList(condition: {artistId: 127}) {
    id
    title
    tracksByAlbumIdList {
      id
      name
      genreByGenreId {
        name
      }
    }
  }
}

as well as this:

{
  allAlbums(condition: {artistId: 127}) {
    nodes {
      id
      title
      tracksByAlbumId {
        nodes {
          id
          name
          genreByGenreId {
            name
          }
        }
      }
    }
  }
}

Enable via --simple-collections both


This is hopefully the last release before we bump to 4.0.0 RC1! 🎉


New features:

  • Massively improved performance
  • Collections as lists (in addition to the current Relay connections) - enable via --simple-collections both
  • Ability to disable the query log in the CLI version of PostGraphile

Refactoring:

  • All graphile-build plugin hooks now accept the form (obj, build, context) => {...} rather than performing destructuring within the arguments - this should make the code slightly easier to read and more idiomatic - thanks to @mattbretl for this!

Fixes:

  • GraphQL aliases longer than 63 characters no longer cause the system to throw errors (this might cause a small breaking change for plugin authors, but I think it's unlikely).

Don't miss a new crystal release

NewReleases is sending notifications on new releases.