Files
klz-cables.com/.pnpm-store/v10/files/9d/d21fef1ae353d498681d35611219fb69460305b5e7d69f1347a07e85843a0aa782664dcd7f0c57eb334da0f43659e8dc76d7db6a1ddc4f75da0a3ba0e9083d
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

31 lines
1.2 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLNonPositiveFloat = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const utilities_js_1 = require("./utilities.js");
exports.GraphQLNonPositiveFloat = new graphql_1.GraphQLScalarType({
name: 'NonPositiveFloat',
description: 'Floats that will have a value of 0 or less.',
serialize(value) {
return (0, utilities_js_1.processValue)(value, 'NonPositiveFloat');
},
parseValue(value) {
return (0, utilities_js_1.processValue)(value, 'NonPositiveFloat');
},
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-positive floating point numbers but got a: ${ast.kind}`, { nodes: ast });
}
return (0, utilities_js_1.processValue)(ast.value, 'NonPositiveFloat');
},
extensions: {
codegenScalarType: 'number',
jsonSchema: {
title: 'NonPositiveFloat',
type: 'number',
maximum: 0,
},
},
});