sdy

init searchUser

1 +type Query {
2 + searchUser(name: String!): [User!]!
3 +}
1 +import { prisma } from "../../../middlewares";
2 +
3 +export default {
4 + Query: {
5 + searchUser: async (_, args) => {
6 + const { name } = args;
7 + const user = await prisma.user.findOne({});
8 + },
9 + },
10 +};