Instructor: 00:00 We did not define any field to fetch the single product. I'm going to define a new field, getProduct. It will take the argument ID, and the return type is ID. It will return the single product.
00:14 Now we need resolver, because we don't have resolver to fetch the single product. The name is getProduct. The first argument is root. I am not going to use root object here. I am going destructure the ID. Now I'm going to apply await expression. We can use findOne method, product.findByID.
00:36 Let's say I'm going to use find by ID. Here, we need to provide the simple ID. Let me refresh that. Let me check the docs. Cool. Here we have getProduct. It will accept the ID argument and it will return the product.
00:50 I am going to copy the ID of my product. Let me write the query to getProduct. We must need to provide the ID. I am going to paste ID here. It will return the ID. I want to see the ID in the response. I also want to see the name and qty. Let me execute the query. Cool. Here we have single product. I found the product by ID.