import { getUserBadges } from '$lib/Database/SB/User/badges'; import type { WithIndex } from '../$types'; import type { Resolvers, Badge } from './$types'; export const resolvers: WithIndex = { Query: { User: async (_, args /* , _context */) => { return { id: args.id, badges: (await getUserBadges(args.id)) as Badge[] }; } } };