You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which returns max JS safe integer, however that is not compatible with GraphlQLs "Int" type. (Int cannot represent non 32-bit signed integer value: 9007199254740991)
Expected behavior
Max number possible for GraphQL Int type.
Environment (please complete the following information):
@vendure/core version: v0.18.4
The text was updated successfully, but these errors were encountered:
return2**31-1;// max 32-bit signed int, so it is safe for the GraphQL Int type
but I decided against it because I don't want the GraphQL abstraction leaking into a service method like that. Since you control the resolver, it's trivial to add a Math.min() around the result to make it safe for GraphQL.
On a related note, I've just implemented a solution to #442 which will allow you to specify a StockDisplayStrategy which you may find preferable to use in future.
Describe the bug
in getSaleableStockLevel method there is this piece of code:
Which returns max JS safe integer, however that is not compatible with GraphlQLs "Int" type. (Int cannot represent non 32-bit signed integer value: 9007199254740991)
Expected behavior
Max number possible for GraphQL Int type.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: