-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When I try to use the gridsome-source-graphql source, the recommender plugin cannot find the specified option.typeName
The error message I receive is:
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.
Here is an excerpt from my gridsome.config.js file which does not work.
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
}
},
Metadata
Metadata
Assignees
Labels
No labels