Skip to main content
Version: 4.x

Aggregates

PostGraphile has support in its plugin system for powerful aggregates. This system was only introduced in 4.4 and is not well documented yet; should you need aggregates good starting points are:

Aggregates ignore pagination info

Aggregates are performed over the entire collection - not just the data that would be returned if you were to query the nodes. This means they ignore the first, last, before, after and offset arguments. This is deliberate (if you only need aggregates over the data that matches your pagination information then you could calculate these on the client).

Aggregates only work on Relay connection

If you're using simpleCollections: "only" you can override it on a per-collection basis with the @simpleCollections smart comment.