Gridsome v0.7.20
Initializing plugins...
gridsome-plugin-recommender: options.typeName 'craft' cannot be found - make sure the collection exists
I am using CraftCMS as a GraphQL data source. When I try to switch to the source-filesystem
such as your example, then it does work, so I believe it's related to the async nature of retrieving the graphql data source and it not being loaded while the recommender loads in.
plugins: [
{
use: '@gridsome/source-graphql',
options: {
url: process.env.CRAFT_API_URL,
fieldName: 'craft',
typeName: 'craft',
headers: {
Authorization: `Bearer ${process.env.CRAFT_API_TOKEN}`,
}
}
},
{
use: "gridsome-plugin-recommender",
options: {
enabled: true,
typeName: 'craft',
field: 'mainContent',
relatedFieldName: 'related',
minScore: 0.01,
maxScore: 1,
minRelations:3,
maxRelations: 10,
fillWithRandom:false,
debug: false
}
},