Closed tekhaus closed 4 years ago
Could this be due to no defaultLang
being set on your plugin options, albeit it being optional?
It could be the defaultLang
indeed. I'm gonna look at it.
Sorry I couldn't reproduce a build error with a similar conf, even if I remove the defaultLang
.
Thank you both for investigating. I was able to reproduce it again right now just by upgrading to 3.6.2. However, adding the defaultLang option does in fact resolve the issue.
I mistakenly read that setting the defaultLang would remove the lang prefix from the paths of the default language, but as long as I don't use the /:lang?/:uid' convention, I'm actually fine.
Hello, first off, thank you for creating this plugin for connecting Gatsby to Prismic.
Just wanted to let you know that somewhere between 3.5.0 and the 3.6.2 release, something has changed in what's being passed to graphqll for localized content which causes a fatal build error.
More specifically, it looks like the doc lang is not being properly passed, resulting in graphql trying to filter on an undefined value.
I can confirm that all of the pages I have in my Prismic repo have published versions for both languages. The build works smoothly with 3.5.0, updating this plugin to 3.6.2 causes this issue, and rolling back fixes it.
Thanks for looking into this bug.