mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Skip serialization for empty or string bigint values in GraphQL (#16297)
This commit is contained in:
@@ -4,6 +4,8 @@ export const GraphQLBigInt = new GraphQLScalarType({
|
||||
name: 'GraphQLBigInt',
|
||||
description: 'BigInt value',
|
||||
serialize(value) {
|
||||
if (!value) return value;
|
||||
if (typeof value === 'string') return value;
|
||||
if (typeof value !== 'number') {
|
||||
throw new Error('Value must be a Number');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user