craftcms / gatsby-source-craft

Gatsby source plugin for Craft CMS.
MIT License
54 stars 13 forks source link

Random number of entries returned #42

Closed andreasottosson closed 3 years ago

andreasottosson commented 3 years ago

Hi!

We have one entry type with 279 entries that returns a completely random number of entries when queried from Gatsby. Craft´s built in GraphiQL always returns all 279. We can run gatsby develop and get 133, then run gatsby clean, run gatsby develop again and get 200, 179, 249 and so on. Completely random. This data in Craft is imported from a CSV file using Feed Me. I have cleared all caches in Craft and also re-saved all entries using the CLI and tried disabling / enabling all those entries.

This also happens when running gatsby build, we added a console.log to show the number of entries in the build log.

Any ideas what we are missing or how to debug this issue?

andris-sevcenko commented 3 years ago

@andreasottosson can you check if the resolution used here fixes this for you?

andreasottosson commented 3 years ago

@andris-sevcenko oh man, thanks! We tried searching but missed this old issue.

So the solution was, https://github.com/craftcms/gatsby-source-craft/issues/21#issuecomment-768407377

andris-sevcenko commented 3 years ago

Awesome!