Files
klz-cables.com/.pnpm-store/v10/files/47/e708e9863878a62ed6cee93488b5336096fb817c8605f4e5e42e0ec765909e944e948952306d81228a8d7a1760b51db10ba32aca7cff932d13911a613be7bb
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

27 lines
1001 B
Plaintext

import { findVersionByIDOperationGlobal, isolateObjectProperty } from 'payload';
import { buildSelectForCollection } from '../../utilities/select.js';
export function findVersionByID(globalConfig) {
return async function resolver(_, args, context, info) {
const req = context.req = isolateObjectProperty(context.req, [
'locale',
'fallbackLocale',
'transactionID'
]);
const select = context.select = args.select ? buildSelectForCollection(info) : undefined;
req.locale = args.locale || req.locale;
req.fallbackLocale = args.fallbackLocale || req.fallbackLocale;
req.query = req.query || {};
const options = {
id: args.id,
depth: 0,
draft: args.draft,
globalConfig,
req,
select
};
const result = await findVersionByIDOperationGlobal(options);
return result;
};
}
//# sourceMappingURL=findVersionByID.js.map