Files
klz-cables.com/.pnpm-store/v10/files/6f/f6c86a3dca0d025421a6531dec914da316ebfc9357e29b7ef6832e4f430bf2d756406d0e6426c042b64ba414b4278d0f0c2672c2d833669a91bea7ed346b27
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

34 lines
1.2 KiB
Plaintext

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