Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

type Query {
frameworks: [Framework!]
framework(id: ID!): Framework

languages: [Language!]
language(id: ID!): Language

concurrencys: [Concurrency!]
concurrency(id: ID!): Concurrency

keys: [Key!]
key(id: ID!): Key

metrics: [Metric!]
metric(id: ID!): Metric

values: [Value!]
value(id: ID!): Value
}

type Framework {
id: ID
label: String!
language: Language
}

type Langauge {
id: ID
label: String!
}

type Concurrency {
id: ID
level: Int
}

type Key {
id: ID
label: String!
}

type Metric {
id: ID
framework: Framework
value: Value
concurrency: Concurrency
}

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.

key: Key
}