Skip to content

Commit

Permalink
feature(hero): update the get hero gql query
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Chabardes committed May 31, 2022
1 parent 6a4705f commit a30022c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export interface Hero {
level: number;
currentHp: number;
inventory?: Nullable<Item[]>;
equippedItem?: Nullable<string>;
}

export interface Item {
Expand Down
1 change: 1 addition & 0 deletions src/heroes/interface/graphql/hero.gql-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export const mapHeroEntityToHeroSchema = (hero: HeroEntity): HeroSchema => {
xp: hero.xp,
level: hero.level,
currentHp: hero.currentHp,
equippedItem: hero.equippedItem,
};
};
1 change: 1 addition & 0 deletions src/heroes/interface/graphql/hero.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type Hero {
level: Int!
currentHp: Int!
inventory: [Item!]
equippedItem: ID
}

type Mutation {
Expand Down

0 comments on commit a30022c

Please # to comment.