BigIntegerField should convert to Float?
See original GitHub issueI’m not sure what the best solution to this would be, but converting models.BigIntegerField()
to graphene.Int()
will often give me the error.
{
"errors": [
{
"message": "Int cannot represent non 32-bit signed integer value: 2554208328"
}
],
"data": {
"match": null
}
}
Maybe we would be better off converting it to a graphene.Float()
?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Big integer field in django models - Stack Overflow
How to truncate a floating point number to an arbitrary decimal place? Why does the FRE() function in CBM BASIC v2 return negative...
Read more >Model field reference - Django documentation
If the verbose name isn't given, Django will automatically create it using the field's attribute name, converting underscores to spaces. See Verbose field...
Read more >FloatField - Django Models - GeeksforGeeks
FloatField is a floating-point number represented in Python by a float instance. ... If this isn't given, Django will use the field's name....
Read more >How To Convert Data Types in Python 3 - DigitalOcean
This Python 3 tutorial will guide you through converting data types including ... Python's method float() will convert integers to floats.
Read more >How to convert price datatype field to float - ServiceNow
Hi, I need to write a Client Script that get the value from a form field that has a Price datatype and convert...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @brianjp93, this is still an issue in 2021 😅
You can register the custom field so it uses it automatically for every models.BigIntegerField. Run the following in an app -> ready method for example.
you might want to create your own scalar for big integers.