Fix: return key

This commit is contained in:
Mohammed Taher Ghazal
2022-08-19 19:06:10 +03:00
committed by GitHub
parent 1a73b403ae
commit be06f553d2

View File

@@ -56,9 +56,9 @@ const MyProfile = objectType({
t.nonNull.list.nonNull.field('walletsKeys', {
type: "WalletKey",
resolve: async (parent) => {
const keys = await prisma.user.findUnique({ where: { id: parent.id } }).userKeys();
return keys.map(k => ({ ...k, key: k.key.slice(0, 10) + '...' }))
resolve: (parent) => {
return prisma.user.findUnique({ where: { id: parent.id } }).userKeys();
}
});
}
@@ -238,4 +238,4 @@ module.exports = {
// Mutations
updateProfileDetails,
updateUserPreferences,
}
}