Files
klz-cables.com/.pnpm-store/v10/files/b4/5d097deff3fb1661378ddf24394455df0d6dc743e66fe1a291b6ba0e40280a23fe7caf0f71e69d7d9fe975a83fb6a5501e9095446cf29847c8d536f5fc76c0
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.GraphQLNonPositiveInt = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const utilities_js_1 = require("./utilities.js");
exports.GraphQLNonPositiveInt = new graphql_1.GraphQLScalarType({
name: 'NonPositiveInt',
description: 'Integers that will have a value of 0 or less.',
serialize(value) {
return (0, utilities_js_1.processValue)(value, 'NonPositiveInt');
},
parseValue(value) {
return (0, utilities_js_1.processValue)(value, 'NonPositiveInt');
},
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.INT) {
throw (0, error_js_1.createGraphQLError)(`Can only validate integers as non-positive integers but got a: ${ast.kind}`, {
nodes: ast,
});
}
return (0, utilities_js_1.processValue)(ast.value, 'NonPositiveInt');
},
extensions: {
codegenScalarType: 'number',
jsonSchema: {
title: 'NonPositiveInt',
type: 'integer',
maximum: 0,
},
},
});