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

28 lines
984 B
Plaintext

import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../error.js';
import { processValue } from './utilities.js';
export const GraphQLNegativeFloat = /*#__PURE__*/ new GraphQLScalarType({
name: 'NegativeFloat',
description: 'Floats that will have a value less than 0.',
serialize(value) {
return processValue(value, 'NegativeFloat');
},
parseValue(value) {
return processValue(value, 'NegativeFloat');
},
parseLiteral(ast) {
if (ast.kind !== Kind.FLOAT && ast.kind !== Kind.INT) {
throw createGraphQLError(`Can only validate floating point numbers as negative floating point numbers but got a: ${ast.kind}`, { nodes: ast });
}
return processValue(ast.value, 'NegativeFloat');
},
extensions: {
codegenScalarType: 'number',
jsonSchema: {
title: 'NegativeFloat',
type: 'number',
maximum: 0,
},
},
});