GraphQL: How to group by more than one field?

System Information
  • Strapi Version: 3.5.2
  • Operating System: Ubuntu 18.04
  • Database: MySql
  • Node Version: 14.16.0
  • NPM Version: 6.14.11
  • Yarn Version:

Hi there,

I am creating a static web page with Gatsby and Strapi. To tell Gatsby which pages it needs to create I need to provide a GraphQL query that groups by more than one field since I want pages that are reachable with the following routes: https:////<group by field 2>
For example:

://myserver/product1/large
://myserver/product1/medium
://myserver/product1/small
://myserver/product2/large
://myserver/product2/medium
://myserver/product2/small

I managed to get grouping by one field to work but I am struggling to group by more than one field. I would be very happy if someone could explain to me how I can group by more than one field.
Any help is very much appreciated.

Regards,
Dirk.