Skip to content

Initial schema #1

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Initial schema #1

wants to merge 2 commits into from

Conversation

ohler55
Copy link

@ohler55 ohler55 commented Mar 22, 2020

I wasn't sure how the various types relate to once another so I followed the Rake seed target. I suspect there is something missing as I did not see any floats which I would expect for values of benchmarks.

Copy link
Contributor

@waghanza waghanza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand how graphql schema works, so I assume this is working (at least you have more skills on that 🎉)

schema.graphql Outdated

type Value {
id: ID
value: Int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ohler55 Those are values stored in database stored as float

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought so too. The seed script seemed to use setting an attribute called value with an int. Maybe that is meant to be something else. I did not see a float being set in the seeding though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you know what attributes are in the Postgres tables I'll update based on that. That would be better than inspecting a seeded object after it is created.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely. In fact, there are stored as double precision in postgresql (honestly in prefer not to take care of other engines) and considered as Float in Ruby

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No matter if seeds uses Integer 😛 they are automatically casted before storing in database

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change pushed.

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

Successfully merging this pull request may close these issues.

2 participants