Dynamically fetch locales

Is there a way to dynamically fetch the active locales in a Prismic repo?

It seems redundant to have to hardcode the same values in the plugin configuration for the available locales:

I'm using gatsby-source-prismic-graphql but I couldn't find any way to do this outside of the plugin either, i.e. even a manual fetch request to the Prismic API.

1 Like