Files
klz-cables.com/.pnpm-store/v10/files/1e/ad6faa37c6af49ac90e06a0f95cd017507e44956a294b536a5af1a12777ef8e3a9038ff45f2d08f87d5ddc5d362b71d9a80f51b410776007a20882ea80bcb7
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

33 lines
1.1 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLPositiveInt = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const utilities_js_1 = require("./utilities.js");
exports.GraphQLPositiveInt = new graphql_1.GraphQLScalarType({
name: 'PositiveInt',
description: 'Integers that will have a value greater than 0.',
serialize(value) {
return (0, utilities_js_1.processValue)(value, 'PositiveInt');
},
parseValue(value) {
return (0, utilities_js_1.processValue)(value, 'PositiveInt');
},
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.INT) {
throw (0, error_js_1.createGraphQLError)(`Can only validate integers as positive integers but got a: ${ast.kind}`, {
nodes: ast,
});
}
return (0, utilities_js_1.processValue)(ast.value, 'PositiveInt');
},
extensions: {
codegenScalarType: 'number',
jsonSchema: {
title: 'PositiveInt',
type: 'integer',
minimum: 1,
},
},
});