use getItem meta helper more places
This commit is contained in:
		
							parent
							
								
									9e38013626
								
							
						
					
					
						commit
						7b60dc5e9f
					
				@ -228,13 +228,13 @@ export default {
 | 
				
			|||||||
    __resolveType: async (n, args, { models }) => n.type
 | 
					    __resolveType: async (n, args, { models }) => n.type
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  Votification: {
 | 
					  Votification: {
 | 
				
			||||||
    item: async (n, args, { models }) => getItem(n, { id: n.id }, { models })
 | 
					    item: async (n, args, { models, me }) => getItem(n, { id: n.id }, { models, me })
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  Reply: {
 | 
					  Reply: {
 | 
				
			||||||
    item: async (n, args, { models }) => getItem(n, { id: n.id }, { models })
 | 
					    item: async (n, args, { models, me }) => getItem(n, { id: n.id }, { models, me })
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  JobChanged: {
 | 
					  JobChanged: {
 | 
				
			||||||
    item: async (n, args, { models }) => getItem(n, { id: n.id }, { models })
 | 
					    item: async (n, args, { models, me }) => getItem(n, { id: n.id }, { models, me })
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  Streak: {
 | 
					  Streak: {
 | 
				
			||||||
    days: async (n, args, { models }) => {
 | 
					    days: async (n, args, { models }) => {
 | 
				
			||||||
@ -269,7 +269,7 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  Mention: {
 | 
					  Mention: {
 | 
				
			||||||
    mention: async (n, args, { models }) => true,
 | 
					    mention: async (n, args, { models }) => true,
 | 
				
			||||||
    item: async (n, args, { models }) => getItem(n, { id: n.id }, { models })
 | 
					    item: async (n, args, { models, me }) => getItem(n, { id: n.id }, { models, me })
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  InvoicePaid: {
 | 
					  InvoicePaid: {
 | 
				
			||||||
    invoice: async (n, args, { me, models }) => getInvoice(n, { id: n.id }, { me, models })
 | 
					    invoice: async (n, args, { me, models }) => getInvoice(n, { id: n.id }, { me, models })
 | 
				
			||||||
 | 
				
			|||||||
@ -587,8 +587,8 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
      return msatsToSats(user.msats)
 | 
					      return msatsToSats(user.msats)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    bio: async (user, args, { models }) => {
 | 
					    bio: async (user, args, { models, me }) => {
 | 
				
			||||||
      return getItem(user, { id: user.bioId }, { models })
 | 
					      return getItem(user, { id: user.bioId }, { models, me })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    hasInvites: async (user, args, { models }) => {
 | 
					    hasInvites: async (user, args, { models }) => {
 | 
				
			||||||
      const invites = await models.user.findUnique({
 | 
					      const invites = await models.user.findUnique({
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user