File tree Expand file tree Collapse file tree 1 file changed +42
-2
lines changed Expand file tree Collapse file tree 1 file changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,6 @@ query HelloQuery {
96
96
}
97
97
```
98
98
99
-
100
-
101
99
``` javascript
102
100
query FindBooksQuery {
103
101
findBooks {
@@ -108,6 +106,16 @@ query FindBooksQuery {
108
106
}
109
107
```
110
108
109
+ ``` javascript
110
+ query FindAllAuthors{
111
+ findAuthors {
112
+ _id
113
+ firstName
114
+ lastName
115
+ }
116
+ }
117
+ ```
118
+
111
119
** POST** /url-of-the-deployed-lambda/graphql
112
120
113
121
Following * Mutations* have the same URL mentioned above
@@ -146,4 +154,36 @@ mutation UpdateBookMutation($updateId: ID!, $bookData: UpdataBookParams!) {
146
154
}
147
155
}
148
156
```
157
+ ``` javascript
158
+ mutation AddAuthorMutation {
159
+ addAuthor (firstName : " Agatha" , lastName : " Christie" ){
160
+ _id
161
+ firstName
162
+ }
163
+ }
164
+ ```
149
165
166
+ ``` javascript
167
+ mutation DeleteAuthorMutation {
168
+ deleteAuthor (_id: " 62d6afb823b01d6d1ff85988" )
169
+ }
170
+ ```
171
+
172
+ ``` javascript
173
+ mutation UpdateAuthorMutation (
174
+ $updateId: ID !
175
+ $authorData: UpdataAuthorParams!
176
+ ) {
177
+ updateAuthor (_id: $updateId, updateAuthorData: $authorData)
178
+ }
179
+
180
+ // variables
181
+ {
182
+ " updateId" : " 62d6afd523b01d6d1ff85989" ,
183
+ " authorData" : {
184
+ " firstName" : " Agatha" ,
185
+ " lastName" : " Christie" ,
186
+ " country" : " United Kingdom"
187
+ }
188
+ }
189
+ ```
You can’t perform that action at this time.
0 commit comments