Code Room
Code reviewHard
Question
Review this JavaScript GraphQL resolver.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
const resolvers = { Post: { author: async (post) => { return await db.users.findById(post.authorId); }, comments: async (post) => { return await db.comments.findByPost(post.id); }, },};// Query: { posts { title author { name } comments { body } } }Run or narrate your approach, then ask the coach.