Add display user page
This commit is contained in:
@@ -15,6 +15,7 @@ export const schema = gql`
|
||||
type Query {
|
||||
users: [User!]!
|
||||
user(id: String!): User
|
||||
userName(userName: String!): User
|
||||
}
|
||||
|
||||
input CreateUserInput {
|
||||
|
||||
@@ -10,6 +10,12 @@ export const user = ({ id }) => {
|
||||
})
|
||||
}
|
||||
|
||||
export const userName = ({ userName }) => {
|
||||
return db.user.findOne({
|
||||
where: { userName },
|
||||
})
|
||||
}
|
||||
|
||||
export const createUser = ({ input }) => {
|
||||
return db.user.create({
|
||||
data: input,
|
||||
|
||||
Reference in New Issue
Block a user