Okay, well I was also looking for solution to this and here it is:
Mutation example of adding employee using Graphql Playground, most important step after you have added the code below to playground tab window:
# Write your query or mutation here
mutation AddEmployee(
$name: String!,
$phoneNumber: String!,
$email: String! ,
$designation: String,
$image: String) {
addEmployee(employee:
{ name: $name, phoneNumber:$phoneNumber, email: $email, designation: $designation, image:$image },
)
{
emp_id
name
}
}
You need to add your JSON payload to QUERY VARIABLES tab window (which is closed by default on below main playground window, without this input payload you will not see results, but error. (keep an eye on here while you make mutation test in graphql playground)
Thanks for visiting!
In today’s fast-paced work environment, meetings are essential but can often feel unproductive. However, by…
Gold is one of the most coveted precious metals in the world, adored for its…
Gold, the shimmering metal synonymous with wealth, power, and beauty, has been deeply intertwined with…
How to Onboard an Intern in a Small, Individual-Based Company Hiring an intern can be…