How to query media fields on Strapi v4 with Gatsby?

Hi there,

Experienced the same issue with nested collectionTypes.

For Rest API, the solution is indeed to use ?populate=*

For GraphQL the solution is to add this to your gatsby-config:
{
name: ‘article’,
endpoint: ‘api/articles’,
api: {qs: {populate: ‘*’}}
}

After this, restart your server and it should work.

Let me know.

Kind regards, Jeroen