Conversation
app/models/graph/types/person.rb
Outdated
"The birth year of the person, using the in-universe standard of BBY or ABY"\ | ||
" - Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin"\ | ||
" is a battle that occurs at the end of Star Wars episode IV: A New Hope.", | ||
property: :birth_year | ||
|
||
field :eyeColor, types.String, | ||
field :eyeColor, !types.String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Person.where(eye_color: nil).map(&:name)
Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."eye_color" IS NULL
=> ["Wat Tambor", "Ratts Tyerell", "Captain Phasma"]
787e1c7
to
06883f8
Compare
app/models/graph/types/person.rb
Outdated
field :homeworld, !Planet, "A planet that this person was born on or inhabits." | ||
field :mass, !types.Int, "The mass of the person in kilograms." | ||
field :name, !types.String, "The name of this person." | ||
field :skinColor, !types.String, "The skin color of this person.", property: :skin_color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Person.where(skin_color: nil).map(&:name)
Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."skin_color" IS NULL
=> ["Chewbacca", "Captain Phasma"]
app/models/graph/types/person.rb
Outdated
field :mass, types.Int, "The mass of the person in kilograms." | ||
field :name, types.String, "The name of this person." | ||
field :skinColor, types.String, "The skin color of this person.", property: :skin_color | ||
field :height, !types.Int, "The height of the person in centimeters." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Person.where(height: nil).map(&:name)
Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."height" IS NULL
=> ["Arvel Crynyd", "BB8", "Poe Dameron", "Rey", "Captain Phasma", "Finn"]
app/models/graph/types/person.rb
Outdated
field :skinColor, types.String, "The skin color of this person.", property: :skin_color | ||
field :height, !types.Int, "The height of the person in centimeters." | ||
field :homeworld, !Planet, "A planet that this person was born on or inhabits." | ||
field :mass, !types.Int, "The mass of the person in kilograms." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here :(
app/models/graph/types/person.rb
Outdated
field :name, types.String, "The name of this person." | ||
field :skinColor, types.String, "The skin color of this person.", property: :skin_color | ||
field :height, !types.Int, "The height of the person in centimeters." | ||
field :homeworld, !Planet, "A planet that this person was born on or inhabits." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too :(
app/models/graph/types/planet.rb
Outdated
field :name, types.String, "The name of this planet." | ||
field :diameter, types.Int, "The diameter of this planet in kilometers." | ||
field :name, !types.String, "The name of this planet." | ||
field :diameter, !types.Int, "The diameter of this planet in kilometers." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Planet.where(diameter: nil).count
(0.2ms) SELECT COUNT(*) FROM "planets" WHERE "planets"."diameter" IS NULL
=> 17
😭
app/models/graph/types/planet.rb
Outdated
|
||
field :rotationPeriod, types.Int, | ||
field :rotationPeriod, !types.Int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Planet.where(rotation_period: nil).count
(0.2ms) SELECT COUNT(*) FROM "planets" WHERE "planets"."rotation_period" IS NULL
=> 13
😭
app/models/graph/types/planet.rb
Outdated
"The number of standard hours it takes for this planet to complete a single rotation on its axis.", | ||
property: :rotation_period | ||
|
||
field :orbitalPeriod, types.Int, | ||
field :orbitalPeriod, !types.Int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Planet.where(orbital_period: nil).count
(0.2ms) SELECT COUNT(*) FROM "planets" WHERE "planets"."orbital_period" IS NULL
=> 13
surprise! 😭
app/models/graph/types/planet.rb
Outdated
"The number of standard days it takes for this planet to complete a single orbit of its local star.", | ||
property: :orbital_period | ||
|
||
field :gravity, types.String, | ||
field :gravity, !types.String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one too.
app/models/graph/types/planet.rb
Outdated
|
||
field :surfaceWater, types.Float, | ||
field :surfaceWater, !types.Float, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
population
, climate
, terrain
, surfaceWater
. All of these too. 😭
app/models/graph/types/species.rb
Outdated
field :classification, types.String, "The classification of this species, such as \"mammal\" or \"reptile\"." | ||
field :designation, types.String, "The designation of this species, such as \"sentient\"." | ||
field :name, !types.String, "The name of this species." | ||
field :classification, !types.String, "The classification of this species, such as \"mammal\" or \"reptile\"." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Species.where(classification: nil).count
(1.3ms) SELECT COUNT(*) FROM "species" WHERE "species"."classification" IS NULL
=> 6
app/models/graph/types/species.rb
Outdated
field :language, types.String, "The language commonly spoken by this species." | ||
field :homeworld, Graph::Types::Planet, "A planet that this species originates from type." | ||
field :language, !types.String, "The language commonly spoken by this species." | ||
field :homeworld, !Graph::Types::Planet, "A planet that this species originates from type." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(1.9ms) SELECT COUNT(*) FROM "species" WHERE "species"."homeworld_id" IS NULL
=> 2
app/models/graph/types/species.rb
Outdated
description "Common skin colors for this species, null if this species does not typically have skin." | ||
resolve ->(species, _, _) do | ||
return unless colors = species.skin_colors | ||
colors.split(", ") | ||
end | ||
end | ||
|
||
field :language, types.String, "The language commonly spoken by this species." | ||
field :homeworld, Graph::Types::Planet, "A planet that this species originates from type." | ||
field :language, !types.String, "The language commonly spoken by this species." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(0.1ms) SELECT COUNT(*) FROM "species" WHERE "species"."language" IS NULL
=> 1
merging, only name is non null except for film |
forgot about non nulls! Pretty sure all these fields are non-null, havent verified all of them but worst case well fix when we see errors. @cjoudrey