User Mutation
register(userInfo)
userInfo
⟹ Register Input
⮩ User Response- Operation
- Variables
- Response
mutation Register($userInfo: RegisterInput!) {
register(userInfo: $userInfo) {
user {
id
fullName
username
email
role
createdAt
updatedAt
}
errors {
field
message
}
}
}
{
"userInfo": {
"fullName": "Devesh K",
"email": "dev1234@dev1234.com",
"username": "dev",
"password": "myp4s$$w0rd"
}
}
{
"data": {
"register": {
"user": {
"id": "6310a1ec9b51eef3ba27fe18",
"fullName": "Devesh K",
"username": "dev",
"email": "dev1234@dev1234.com",
"role": "USER",
"createdAt": "1662034412416",
"updatedAt": "1662034412416"
},
"errors": null
}
}
}
login(userInfo)
userInfo
⟹ Login Input
⮩ User Response- Operation
- Variables
- Response
mutation Login($userInfo: LoginInput!) {
login(userInfo: $userInfo) {
user {
id
fullName
username
email
role
createdAt
updatedAt
}
errors {
field
message
}
}
}
{
"userInfo": {
"usernameOrEmail": "dev",
"password": "myp4s$$w0rd"
}
}
{
"data": {
"login": {
"user": {
"id": "6310a1ec9b51eef3ba27fe18",
"fullName": "Devesh K",
"username": "dev",
"email": "dev1234@dev1234.com",
"role": "USER",
"createdAt": "1662034412416",
"updatedAt": "1662034412416"
},
"errors": null
}
}
}
logout
⮩ Boolean- Operation
- Response
mutation Logout {
logout
}
{
"data": {
"logout": true
}
}
addMockUserData(numberOfUsers)
numberOfUsers
⟹ Int
⮩ Boolean- Operation
- Variables
- Response
mutation AddMockUserData($numberOfUsers: Int!) {
addMockUserData(numberOfUsers: $numberOfUsers)
}
{
"numberOfUsers": 10
}
{
"data": {
"addMockUserData": true
}
}