TypeScript Mutation Operations
In this part, we'll create two mutations, create
and update
, that will create and update users in our database.
Let's start with the create
operation:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Similarly to the get
operation, we're using the createOperation.mutation
function to create a mutation operation.
Let's call this operation using curl:
1
The result should be:
1
2
3
4
5
6
7
Next, let's implement the update
operation:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Let's call this operation using curl:
1
The result should be:
1
2
3
4
5
6
7