@@ -3,6 +3,9 @@ export default {
33 achievements ( obj , args , context , info ) {
44 return context . util . paginate ( context . data . worker . task . getAchievements ( context , info ) , args ) ;
55 } ,
6+ prestige ( obj , args , context , info ) {
7+ return context . util . paginate ( context . data . worker . task . getPrestiges ( context , info ) , args ) ;
8+ } ,
69 async tasks ( obj , args , context , info ) {
710 let tasks = await context . data . worker . task . getList ( context , info ) ;
811 if ( args . faction ) {
@@ -40,6 +43,33 @@ export default {
4043 return context . data . worker . task . getLocale ( data . rarity , context , info ) ;
4144 } ,
4245 } ,
46+ CustomizationItem : {
47+ __resolveType ( data , args , context ) {
48+ return data . __typename ;
49+ } ,
50+ } ,
51+ CustomizationItemBasic : {
52+ name ( data , args , context , info ) {
53+ return context . data . worker . task . getLocale ( data . name , context , info ) ;
54+ } ,
55+ customizationTypeName ( data , args , context , info ) {
56+ return context . data . worker . task . getLocale ( data . customizationTypeName , context , info ) ;
57+ } ,
58+ } ,
59+ CustomizationItems : {
60+ name ( data , args , context , info ) {
61+ return context . data . worker . task . getLocale ( data . name , context , info ) ;
62+ } ,
63+ customizationTypeName ( data , args , context , info ) {
64+ return context . data . worker . task . getLocale ( data . customizationTypeName , context , info ) ;
65+ } ,
66+ items ( data , args , context , info ) {
67+ if ( ! data . items ?. length ) {
68+ return [ ] ;
69+ }
70+ return data . items . map ( id => context . data . worker . item . getItem ( context , info , id ) ) ;
71+ } ,
72+ } ,
4373 HealthEffect : {
4474 bodyParts ( data , args , context , info ) {
4575 if ( data . bodyParts . length === 0 ) {
@@ -59,6 +89,24 @@ export default {
5989 return context . data . worker . map . get ( context , info , data . map ) ;
6090 } ,
6191 } ,
92+ Prestige : {
93+ name ( data , args , context , info ) {
94+ return context . data . worker . task . getLocale ( data . name , context , info ) ;
95+ } ,
96+ } ,
97+ PrestigeTransferSettings : {
98+ __resolveType ( data , args , context ) {
99+ if ( data . gridWidth ) {
100+ return 'PrestigeTransferSettingsStash' ;
101+ }
102+ return 'PrestigeTransferSettingsSkill' ;
103+ } ,
104+ } ,
105+ PrestigeTransferSettingsSkill : {
106+ name ( data , args , context , info ) {
107+ return context . data . worker . task . getLocale ( data . name , context , info ) ;
108+ } ,
109+ } ,
62110 SkillLevel : {
63111 skill ( data , args , context , info ) {
64112 return context . data . worker . handbook . getSkill ( context , info , data . name ) ;
@@ -77,7 +125,13 @@ export default {
77125 map ( data , args , context , info ) {
78126 if ( data . location_id ) return context . data . worker . map . get ( context , info , data . location_id ) ;
79127 return null ;
80- }
128+ } ,
129+ requiredPrestige ( data , args , context , info ) {
130+ if ( ! data . requiredPrestige ) {
131+ return null ;
132+ }
133+ return context . data . worker . task . getPrestige ( context , info , data . requiredPrestige )
134+ } ,
81135 } ,
82136 TaskKey : {
83137 keys ( data , args , context , info ) {
@@ -95,12 +149,14 @@ export default {
95149 //return data.gql_type;
96150 if ( data . type === 'findQuestItem' || data . type === 'giveQuestItem' || data . type === 'plantQuestItem' ) {
97151 return 'TaskObjectiveQuestItem' ;
98- } else if ( data . type === 'findItem' || data . type === 'giveItem' || data . type === 'plantItem' || data . type === 'sellItem' ) {
152+ } else if ( data . type === 'findItem' || data . type === 'giveItem' || data . type === 'plantItem' || data . type === 'sellItem' || data . type === 'haveItem' ) {
99153 return 'TaskObjectiveItem' ;
100154 } else if ( data . type === 'mark' ) {
101155 return 'TaskObjectiveMark' ;
102156 } else if ( data . type === 'extract' ) {
103157 return 'TaskObjectiveExtract' ;
158+ } else if ( data . type === 'hideoutStation' ) {
159+ return 'TaskObjectiveHideoutStation' ;
104160 } else if ( data . type === 'skill' ) {
105161 return 'TaskObjectiveSkill' ;
106162 } else if ( data . type === 'traderLevel' ) {
@@ -210,6 +266,14 @@ export default {
210266 return data . requiredKeys . map ( keyIds => keyIds . map ( keyId => context . data . worker . item . getItem ( context , info , keyId ) ) ) ;
211267 } ,
212268 } ,
269+ TaskObjectiveHideoutStation : {
270+ hideoutStation ( data , args , context , info ) {
271+ return context . data . worker . hideout . getStation ( context , info , data . station ) ;
272+ } ,
273+ maps ( data , args , context , info ) {
274+ return [ ] ;
275+ }
276+ } ,
213277 TaskObjectiveItem : {
214278 item ( data , args , context , info ) {
215279 return context . data . worker . item . getItem ( context , info , data . item ) ;
@@ -449,7 +513,20 @@ export default {
449513 return true ;
450514 } ) ;
451515 } ) . filter ( Boolean ) ;
452- }
516+ } ,
517+ async achievement ( data , args , context , info ) {
518+ if ( ! data . achievement ?. length ) {
519+ return [ ] ;
520+ }
521+ const achievements = await context . data . worker . task . getAchievements ( context , info ) ;
522+ return data . achievement . map ( id => {
523+ const achievement = achievements . find ( a => a . id === id ) ;
524+ if ( ! achievement ) {
525+ return false ;
526+ }
527+ return achievement ;
528+ } ) . filter ( Boolean ) ;
529+ } ,
453530 } ,
454531 TaskStatusRequirement : {
455532 task ( data , args , context , info ) {
0 commit comments