query {
allPets {
name
weight
category
inCareOf {
name
}
}
}
mutation { # Modification request
createAccount (input: { # Input added directly
name: "Allen Ben"
username: "allenalvin333"
password: "allenalvin333"
})
{ # Output displays 2 fields
username
name
}
}
mutation ($input: CreateAccountInput!) { # Modification request with compulsory parameter
createAccount (input: $input) # Input added from variable
{ # Output displays 2 fields
username
name
}
}
{ # JSON object
"input": {
"name": "Alvin Ben",
"username": "alvinallen333",
"password": "alvinallen333"
}
}