Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Commit fc4d088

Browse files
committed
remove non nulls for most fields cuz bad data
1 parent 06883f8 commit fc4d088

File tree

6 files changed

+42
-42
lines changed

6 files changed

+42
-42
lines changed

app/models/graph/types/person.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module Types
1212
connection :vehicles, Graph::Types::Vehicle.connection_type
1313
connection :films, Graph::Types::Film.connection_type
1414

15-
field :birthYear, !types.String,
15+
field :birthYear, types.String,
1616
"The birth year of the person, using the in-universe standard of BBY or ABY"\
1717
" - Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin"\
1818
" is a battle that occurs at the end of Star Wars episode IV: A New Hope.",
@@ -22,16 +22,16 @@ module Types
2222
"The eye color of this person. Will be \"unknown\" if not known or \"n/a\" if the person does not have an eye.",
2323
property: :eye_color
2424

25-
field :gender, !GenderEnum, "​The gender of this person."
25+
field :gender, GenderEnum, "​The gender of this person."
2626
field :hairColor, types.String,
2727
"The hair color of this person. Will be \"unknown\" if not known or \"n/a\" if the person does not have hair.",
2828
property: :hair_color
2929

30-
field :height, !types.Int, "The height of the person in centimeters."
31-
field :homeworld, !Planet, "A planet that this person was born on or inhabits."
32-
field :mass, !types.Int, "The mass of the person in kilograms."
30+
field :height, types.Int, "The height of the person in centimeters."
31+
field :homeworld, Planet, "A planet that this person was born on or inhabits."
32+
field :mass, types.Int, "The mass of the person in kilograms."
3333
field :name, !types.String, "The name of this person."
34-
field :skinColor, !types.String, "The skin color of this person.", property: :skin_color
34+
field :skinColor, types.String, "The skin color of this person.", property: :skin_color
3535
end
3636
end
3737
end

app/models/graph/types/planet.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ module Types
1212
connection :residents, Graph::Types::Person.connection_type
1313

1414
field :name, !types.String, "The name of this planet."
15-
field :diameter, !types.Int, "The diameter of this planet in kilometers."
15+
field :diameter, types.Int, "The diameter of this planet in kilometers."
1616

17-
field :rotationPeriod, !types.Int,
17+
field :rotationPeriod, types.Int,
1818
"The number of standard hours it takes for this planet to complete a single rotation on its axis.",
1919
property: :rotation_period
2020

21-
field :orbitalPeriod, !types.Int,
21+
field :orbitalPeriod, types.Int,
2222
"The number of standard days it takes for this planet to complete a single orbit of its local star.",
2323
property: :orbital_period
2424

25-
field :gravity, !types.String,
25+
field :gravity, types.String,
2626
"A number denoting the gravity of this planet, where \"1\" is normal or 1 standard G."\
2727
" \"2\" is twice or 2 standard Gs. \"0.5\" is half or 0.5 standard Gs."
2828

29-
field :population, !types.Float, "The average population of sentient beings inhabiting this planet."
30-
field :climate, !types.String, "The climate of this planet."
31-
field :terrain, !types.String, "The terrain of this planet."
29+
field :population, types.Float, "The average population of sentient beings inhabiting this planet."
30+
field :climate, types.String, "The climate of this planet."
31+
field :terrain, types.String, "The terrain of this planet."
3232

33-
field :surfaceWater, !types.Float,
33+
field :surfaceWater, types.Float,
3434
"The percentage of the planet surface that is naturally occuring water or bodies of water.",
3535
property: :surface_water
3636
end

app/models/graph/types/species.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ module Types
1212
connection :films, Graph::Types::Film.connection_type
1313

1414
field :name, !types.String, "The name of this species."
15-
field :classification, !types.String, "The classification of this species, such as \"mammal\" or \"reptile\"."
16-
field :designation, !types.String, "The designation of this species, such as \"sentient\"."
15+
field :classification, types.String, "The classification of this species, such as \"mammal\" or \"reptile\"."
16+
field :designation, types.String, "The designation of this species, such as \"sentient\"."
1717

18-
field :averageHeight, !types.Float do
18+
field :averageHeight, types.Float do
1919
description "The average height of this species in centimeters."
2020
property :average_height
2121
end
@@ -49,8 +49,8 @@ module Types
4949
end
5050
end
5151

52-
field :language, !types.String, "The language commonly spoken by this species."
53-
field :homeworld, !Graph::Types::Planet, "A planet that this species originates from type."
52+
field :language, types.String, "The language commonly spoken by this species."
53+
field :homeworld, Graph::Types::Planet, "A planet that this species originates from type."
5454
end
5555
end
5656
end

app/models/graph/types/starship.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@ module Types
3131
# Transport Interface Fields
3232

3333
field :name, !types.String, "The name of this starship. The common name, such as \"Death Star\"."
34-
field :model, !types.String, "The model or official name of this starship. Such as \"T-65 X-wing\" or \"DS-1 Orbital Battle Station\"."
34+
field :model, types.String, "The model or official name of this starship. Such as \"T-65 X-wing\" or \"DS-1 Orbital Battle Station\"."
3535

36-
field :manufacturer, !types.String, "The manufacturer of this starship."
36+
field :manufacturer, types.String, "The manufacturer of this starship."
3737
field :costInCredits, types.Float, "The cost of this starship new, in galactic credits", property: :cost_in_credits
38-
field :length, !types.Float, "The length of this starship in meters."
39-
field :crew, !types.String, "The number of personnel needed to run or pilot this starship."
40-
field :passengers, !types.String, "The number of non-essential people this starship can transport."
38+
field :length, types.Float, "The length of this starship in meters."
39+
field :crew, types.String, "The number of personnel needed to run or pilot this starship."
40+
field :passengers, types.String, "The number of non-essential people this starship can transport."
4141

4242
field :maxAtmospheringSpeed, types.Int do
4343
description "The maximum speed of this starship in atmosphere. null
4444
if this starship is incapable of atmosphering flight."
4545
property :max_atmosphering_speed
4646
end
4747

48-
field :cargoCapacity, !types.Float do
48+
field :cargoCapacity, types.Float do
4949
description "The maximum number of kilograms that this starship can transport."
5050
property :cargo_capacity
5151
end
5252

53-
field :consumables, !types.String, "The maximum length of time that this starship can provide consumables for its entire crew without having to resupply."
53+
field :consumables, types.String, "The maximum length of time that this starship can provide consumables for its entire crew without having to resupply."
5454
connection :pilots, Graph::Types::Person.connection_type
5555

5656
field :created_at, !types.String, "The ISO 8601 date format of the time that this resource was created."

app/models/graph/types/transport_interface.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ module Types
55
description "A single transport craft"
66

77
field :name, !types.String
8-
field :model, !types.String
9-
field :manufacturer, !types.String
10-
field :costInCredits, !types.Float
11-
field :length, !types.Float
12-
field :crew, !types.String
13-
field :passengers, !types.String
8+
field :model, types.String
9+
field :manufacturer, types.String
10+
field :costInCredits, types.Float
11+
field :length, types.Float
12+
field :crew, types.String
13+
field :passengers, types.String
1414
field :maxAtmospheringSpeed, types.Int
15-
field :cargoCapacity, !types.Float
16-
field :consumables, !types.String
15+
field :cargoCapacity, types.Float
16+
field :consumables, types.String
1717
connection :pilots, Graph::Types::Person.connection_type
1818
end
1919
end

app/models/graph/types/vehicle.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@ module Types
1717

1818
# Transport Interface Fields
1919
field :name, !types.String, "The name of this vehicle. The common name, such as \"Sand Crawler\" or \"Speeder bike\""
20-
field :model, !types.String, "The model or official name of this vehicle. Such as \"All-Terrain Attack Transport\"."
20+
field :model, types.String, "The model or official name of this vehicle. Such as \"All-Terrain Attack Transport\"."
2121

22-
field :manufacturer, !types.String, "The manufacturer of this vehicle."
22+
field :manufacturer, types.String, "The manufacturer of this vehicle."
2323
field :costInCredits, types.Float, "The cost of this vehicle new, in galactic credits", property: :cost_in_credits
24-
field :length, !types.Float, "The length of this vehicle in meters."
25-
field :crew, !types.String, "The number of personnel needed to run or pilot this vehicle."
26-
field :passengers, !types.String, "The number of non-essential people this vehicle can transport."
24+
field :length, types.Float, "The length of this vehicle in meters."
25+
field :crew, types.String, "The number of personnel needed to run or pilot this vehicle."
26+
field :passengers, types.String, "The number of non-essential people this vehicle can transport."
2727

2828
field :maxAtmospheringSpeed, types.Int do
2929
description "The maximum speed of this vehicle in atmosphere. null
3030
if this vehicle is incapable of atmosphering flight."
3131
property :max_atmosphering_speed
3232
end
3333

34-
field :cargoCapacity, !types.Float do
34+
field :cargoCapacity, types.Float do
3535
description "The maximum number of kilograms that this vehicle can transport."
3636
property :cargo_capacity
3737
end
38-
39-
field :consumables, !types.String, "The maximum length of time that this vehicle can provide consumables for its entire crew without having to resupply."
38+
39+
field :consumables, types.String, "The maximum length of time that this vehicle can provide consumables for its entire crew without having to resupply."
4040
connection :pilots, Graph::Types::Person.connection_type
4141

4242
field :created_at, !types.String, "The ISO 8601 date format of the time that this resource was created."

0 commit comments

Comments
 (0)