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

Query engine: integer fields return floats #160

Closed
steebchen opened this issue Nov 5, 2019 · 4 comments
Closed

Query engine: integer fields return floats #160

steebchen opened this issue Nov 5, 2019 · 4 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Milestone

Comments

@steebchen
Copy link
Contributor

steebchen commented Nov 5, 2019

Defining an integer in the schema and querying for it returns a float.

For example:

model User {
	id  String  @id @default(cuid())
	age Int
}

Sending a query

query {
  findManyUser {
    id
    age
  }
}

returns

{
  "data": {
    "findManyUser": [
      {
        "id": "id",
        "age": 5.0
      }
    ]
  }
}

It should return an integer instead, e.g. "age": 5.

@pantharshit00
Copy link
Contributor

Related photonjs issue: prisma/prisma-client-js#279

@steebchen steebchen added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. labels Nov 20, 2019
@dpetrick
Copy link
Contributor

Fixed.

@janpio
Copy link
Member

janpio commented Nov 21, 2019

Can you confirm @luca pls?

@steebchen
Copy link
Contributor Author

I can confirm that this now works as intended. Now just waiting for a CLI release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

4 participants