I am trying to figure out how to retrieve specific articles based on author (reference), my current function retrieves all articles, but I only want the author specific ones
const resp = yield client.getEntries({
'fields.insightsArticle': true,
'fields.excludeCountries[nin]': country,
'fields.publicationDate[lte]': moment(new Date()).toISOString(),
'fields.author.fields.firstname': author.firstName,
'fields.author.fields.lastname': author.lastName,
content_type: 'insight',
include: 2,
order: '-fields.publicationDate',
limit,
locale,
});
The current log I am getting from contentful is: "When searching on references you must specify the Content Type of the reference. Please send a Content Type id as a query parameter"
I get that, since I am defining the content type as insight.
Any suggestions are welcome!