Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal field type always falls back to precision of 16 #7255

Closed
evangeloszotos opened this issue Feb 1, 2022 · 1 comment
Closed

Decimal field type always falls back to precision of 16 #7255

evangeloszotos opened this issue Feb 1, 2022 · 1 comment

Comments

@evangeloszotos
Copy link

evangeloszotos commented Feb 1, 2022

Steps to reproduce:
define a decimal field eg:

export const Trade = list({
  fields: {
    invest: decimal({
      precision: 32,
      scale: 8,
    }),
  },
});

Expected:
Values like:

'1234567890123456789012.12345678' 

should be valid (works if directly typed in postgres with adminer, see last row in the screenshot)

Screenshot 2022-02-02 at 00 08 41

But does not work when the entity is created with the keystone admin UI or with the graphql endpoint, see other rows.

see screenshot using graphql playground:

Screenshot 2022-02-02 at 00 14 25

I used:
MacBook Pro 2021 M1 Max
keystone-6/core: 1.0.1
postgres: 13-buster (docker image)
node: 14.18.1

Hope that helps.

@dcousens dcousens changed the title Decimal field type does always fall back to precision of 16 Decimal field type always falls back to precision of 16 Feb 8, 2024
@dcousens dcousens added the 🐛 bug Unresolved bug label Feb 8, 2024
@dcousens
Copy link
Member

dcousens commented Feb 8, 2024

I cannot reproduce this, using string 1234567890123456789012.12345678 and POSTGRES 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants