V5 totalCount failing on polymorphic 
### Summary

When using relational polymorphic tables and including totalCount in a query an error is returned

### Steps to reproduce

Using the example at https://postgraphile.org/postgraphile/next/polymorphism#interface-moderelational and running the below query returns an error

query MyQuery {
  relationalItems {
    totalCount
  }
}

### Expected results

The totalCount value populated

### Actual results

"error: column \"__relational_items__.type\" must appear in the GROUP BY clause or be used in an aggregate function"

### Additional context

Using V5 beta 16
