File tree Expand file tree Collapse file tree 1 file changed +36
-4
lines changed Expand file tree Collapse file tree 1 file changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -80,22 +80,54 @@ query HelloQuery {
80
80
}
81
81
```
82
82
83
- ** GET** ``` /url-of-the-deployed-lambda/graphql
83
+ ** GET** /url-of-the-deployed-lambda/graphql
84
84
85
85
``` javascript
86
- query BooksQuery {
87
- getAllBooks {
88
- id
86
+ query FindBooksQuery {
87
+ findBooks {
88
+ _id
89
89
name
90
+ published
90
91
}
91
92
}
92
93
```
93
94
94
95
** POST** /url-of-the-deployed-lambda/graphql
95
96
97
+ Following * Mutations* have the same URL mentioned above
98
+
96
99
``` javascript
97
100
mutation ModifyCount {
98
101
getCount (count: 20 )
99
102
}
100
103
```
101
104
105
+ ``` javascript
106
+ mutation AddBookMutation {
107
+ addBook (name : " You Don't Know JS" ) {
108
+ _id
109
+ name
110
+ }
111
+ }
112
+ ```
113
+
114
+ ``` javascript
115
+ mutation DeleteBookMutation {
116
+ deleteBook (_id: " 62d695824e2ac4c36050f34d" )
117
+ }
118
+ ```
119
+
120
+ ``` javascript
121
+ mutation UpdateBookMutation ($updateId : ID ! , $bookData : UpdataBookParams ! ) {
122
+ updateBook (_id: $updateId, updateBookData: $bookData)
123
+ }
124
+
125
+ // variables
126
+ {
127
+ " updateId" : " 62d6966476c0281419c22c5f" ,
128
+ " bookData" : {
129
+ " name" : " You Don't Know ES6"
130
+ }
131
+ }
132
+ ```
133
+
You can’t perform that action at this time.
0 commit comments