Skip to content

Commit 15eaea3

Browse files
committed
README file is updated with the APIs listing
1 parent fe110b1 commit 15eaea3

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

README.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,54 @@ query HelloQuery {
8080
}
8181
```
8282

83-
**GET** ```/url-of-the-deployed-lambda/graphql
83+
**GET** /url-of-the-deployed-lambda/graphql
8484

8585
```javascript
86-
query BooksQuery {
87-
getAllBooks {
88-
id
86+
query FindBooksQuery {
87+
findBooks {
88+
_id
8989
name
90+
published
9091
}
9192
}
9293
```
9394

9495
**POST** /url-of-the-deployed-lambda/graphql
9596

97+
Following *Mutations* have the same URL mentioned above
98+
9699
```javascript
97100
mutation ModifyCount {
98101
getCount(count: 20)
99102
}
100103
```
101104

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+

0 commit comments

Comments
 (0)