this.$apollo.mutate({
// Mutation
mutation: gql`mutation (
$first_name: String!,
$last_name: String!,
$gender: String,
$weight: Int,
$grown: Int,
$bio: String,
$phone: String!,
$password: String!
) {
createUser(
first_name: $first_name
last_name: $last_name
gender: $gender
weight: $weight
grown: $grown
bio: $bio
phone: $phone
password: $password
) {
id
}
}`,
// Parameters
variables: {
first_name: "asdd",
last_name: "asdasd",
gender: "male",
weight: 85,
grown: 192,
bio: "",
phone: "+79826952999",
password: "asdasdasdasdasd"
}
})
.then((res) => {
console.log(res)
})
.catch((err) => {
console.log(err)
})