Files
klz-cables.com/.pnpm-store/v10/files/6b/dbac6d92e85fa466458ec8db28706d425f431682e36ec410ff05af1e5614cc4e98f320288d226b9b00b9345f10adba8cfbeccbd2ce1c3fabd7a2141a8f4460
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
993 B
Plaintext

import { findVersionByIDOperation, isolateObjectProperty } from 'payload';
import { buildSelectForCollection } from '../../utilities/select.js';
export function findVersionByIDResolver(collection) {
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,
collection,
depth: 0,
req,
select,
trash: args.trash
};
const result = await findVersionByIDOperation(options);
return result;
};
}
//# sourceMappingURL=findVersionByID.js.map