Tomas
08/30/2018, 9:46 AMkratam
08/30/2018, 9:51 AMextractFragmentReplacements
, see the last comment)kratam
08/30/2018, 9:53 AMfragment
and resolve
propsTomas
08/31/2018, 12:22 AMUnknown fragment 'notificationFragment'
Tomas
08/31/2018, 12:22 AM,
async resolve(
_parent,
{ input: { skip = 0, first = 100, visible } },
ctx,
info
): Promise<Yoga.Notification[]> {
const userId = getUserId(ctx);
const user = await ctx.db.query.user(
{ where: { id: userId } },
gql
{
notifications (first: ${first}, skip: ${skip}) {
...notificationFragment
}
}
`
);
return user.notifications;
}
}
};Tomas
08/31/2018, 12:23 AMTomas
08/31/2018, 2:36 AM