Skip to content

Commit

Permalink
Simplify country class
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorblades committed Jan 3, 2024
1 parent 398df27 commit bba0d75
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ const builder = new SchemaBuilder({
});

class Continent {
code: string;
name: string;

constructor(code: string, name: string) {
this.code = code;
this.name = name;
}
constructor(public code: string, public name: string) {}
}

builder.objectType(Continent, {
Expand Down

0 comments on commit bba0d75

Please sign in to comment.