add item descriptions; refactor to full snapshots
This commit is contained in:
parent
1ddf97a953
commit
d2e530e1a0
3 changed files with 1044 additions and 1017 deletions
File diff suppressed because it is too large
Load diff
|
@ -15,6 +15,7 @@ const typeDefs = gql`
|
||||||
type Item {
|
type Item {
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
|
description: String!
|
||||||
thumbnailUrl: String!
|
thumbnailUrl: String!
|
||||||
appearanceOn(speciesId: ID!, colorId: ID!): Appearance
|
appearanceOn(speciesId: ID!, colorId: ID!): Appearance
|
||||||
}
|
}
|
||||||
|
@ -91,6 +92,10 @@ const resolvers = {
|
||||||
const translation = await itemTranslationLoader.load(item.id);
|
const translation = await itemTranslationLoader.load(item.id);
|
||||||
return translation.name;
|
return translation.name;
|
||||||
},
|
},
|
||||||
|
description: async (item, _, { itemTranslationLoader }) => {
|
||||||
|
const translation = await itemTranslationLoader.load(item.id);
|
||||||
|
return translation.description;
|
||||||
|
},
|
||||||
appearanceOn: async (
|
appearanceOn: async (
|
||||||
item,
|
item,
|
||||||
{ speciesId, colorId },
|
{ speciesId, colorId },
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue