add item descriptions; refactor to full snapshots

This commit is contained in:
Matt Dunn-Rankin 2020-04-25 22:40:28 -07:00
parent 1ddf97a953
commit d2e530e1a0
3 changed files with 1044 additions and 1017 deletions

File diff suppressed because it is too large Load diff

View file

@ -15,6 +15,7 @@ const typeDefs = gql`
type Item {
id: ID!
name: String!
description: String!
thumbnailUrl: String!
appearanceOn(speciesId: ID!, colorId: ID!): Appearance
}
@ -91,6 +92,10 @@ const resolvers = {
const translation = await itemTranslationLoader.load(item.id);
return translation.name;
},
description: async (item, _, { itemTranslationLoader }) => {
const translation = await itemTranslationLoader.load(item.id);
return translation.description;
},
appearanceOn: async (
item,
{ speciesId, colorId },

File diff suppressed because it is too large Load diff