UNPKG

@graphql-mesh/grpc

Version:
12 lines (11 loc) 318 B
import Long from 'long'; function patchLongJs() { const originalLongFromValue = Long.fromValue.bind(Long); Long.fromValue = (value) => { if (typeof value === 'bigint') { return Long.fromValue(value.toString()); } return originalLongFromValue(value); }; } patchLongJs();