Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
fix(species): make droids lifespan null as Infinity doesn't parse
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Jul 23, 2021
1 parent e605625 commit 012df40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/assets/species.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default new GraphQLCollection<string, StarWarsApi.Species>([
'droid',
{
averageHeight: null,
averageLifespan: Infinity,
averageLifespan: null,
classification: 'artificial',
designation: 'sentient',
eyeColors: null,
Expand Down
3 changes: 1 addition & 2 deletions src/structures/Species.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import GraphQLLong from '#scalars/GraphQLLong';
import Film from '#structures/Film';
import Person from '#structures/Person';
import Planet from '#structures/Planet';
Expand All @@ -9,7 +8,7 @@ export default class Species {
@Field(() => Int, { nullable: true, description: 'The average heigh of this species, if specified' })
public averageHeight?: number | null;

@Field(() => GraphQLLong, { nullable: true, description: 'The average lifespan of this species, if specified' })
@Field(() => Int, { nullable: true, description: 'The average lifespan of this species, if specified' })
public averageLifespan?: number | null;

@Field(() => String, { nullable: true, description: 'The classification of this species, such as "mammal" or "reptile"' })
Expand Down

0 comments on commit 012df40

Please sign in to comment.