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

32 lines
1.3 KiB
Plaintext

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