this apollo mutate Mutation mutation gql mutation first_name String la

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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)
})