v2 Causes undefined Error
RehanSaeed opened this issue · comments
Hey @RehanSaeed - Would you mind posting your gridsome.config.js
please?
It's all on GitHub here:
https://github.com/RehanSaeed/rehansaeed.github.io/blob/main/gridsome.config.js
Sorry for the delay on this. Have just fixed the issue though, and released a patch version - 2.0.1
.
I've tested it out on your repo, and it seems to build okay now.
Gave 2.0.1 a try. It now compiles fine and I can search to get results back but the result.path
or result.node.permalink
values are undefined
.
I can confirm the same.
Thanks a lot by the way for introducing the GraphQL layer, @thetre97!
Ah, that is actually one big change I have made - apologies, I should have put that into the release notes.
The plugin doesn't automatically add the path field anymore, so you will have to add path or permalink to your collection fields, then you can access them from node.<field>
.
That worked, thanks.