Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
If requiresIndexed true, query for indexed content
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinsina committed Mar 24, 2022
1 parent 6e4734b commit aba41f5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ module.exports = {
withSite,
customAttributes,
updated,
requiresIndexed,
} = input;

// @deprecated Prefer includeContentTypes over contentTypes.
Expand Down Expand Up @@ -951,6 +952,9 @@ module.exports = {
if (includeLabels.length) {
query.labels = { $in: includeLabels };
}
if (requiresIndexed) {
query.$and.push({ $or: [{ 'mutations.Website.noIndex': { $exists: false } }, { 'mutations.Website.noIndex': false }] });
}

const projection = connectionProjection(info);
return basedb.paginate('platform.Content', {
Expand Down

0 comments on commit aba41f5

Please sign in to comment.