forked from microcks/microcks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilms-postman.json
245 lines (245 loc) · 8.71 KB
/
films-postman.json
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
{
"info": {
"_postman_id": "7c00b563-d454-421a-a3b0-17c4e3254cb9",
"name": "Movie Graph API",
"description": "version=1.0 - A Graph API for querying movies",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "queries",
"item": [
{
"name": "allFilms",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query allFilms {\n allFilms {\n totalCount\n films {\n id\n title\n episodeID\n director\n starCount\n rating\n }\n }\n}",
"variables": "{}"
}
},
"url": {
"raw": "http://allFilms",
"protocol": "http",
"host": [
"allFilms"
]
}
},
"response": [
{
"name": "allFilms",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query allFilms {\n allFilms {\n films {\n id\n title\n episodeID\n director\n starCount\n rating\n }\n }\n}",
"variables": "{}"
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [],
"body": "{\n \"data\": {\n \"allFilms\": {\n \"films\": [\n {\n \"id\": \"ZmlsbXM6MQ==\",\n \"title\": \"A New Hope\",\n \"episodeID\": 4,\n \"director\": \"George Lucas\",\n \"starCount\": 432,\n \"rating\": 4.3\n },\n {\n \"id\": \"ZmlsbXM6Mg==\",\n \"title\": \"The Empire Strikes Back\",\n \"episodeID\": 5,\n \"director\": \"Irvin Kershner\",\n \"starCount\": 433,\n \"rating\": 4.3\n },\n {\n \"id\": \"ZmlsbXM6Mw==\",\n \"title\": \"Return of the Jedi\",\n \"episodeID\": 6,\n \"director\": \"Richard Marquand\",\n \"starCount\": 434,\n \"rating\": 4.3\n },\n {\n \"id\": \"ZmlsbXM6NA==\",\n \"title\": \"The Phantom Menace\",\n \"episodeID\": 1,\n \"director\": \"George Lucas\",\n \"starCount\": 252,\n \"rating\": 3.2\n },\n {\n \"id\": \"ZmlsbXM6NQ==\",\n \"title\": \"Attack of the Clones\",\n \"episodeID\": 2,\n \"director\": \"George Lucas\",\n \"starCount\": 320,\n \"rating\": 3.9\n },\n {\n \"id\": \"ZmlsbXM6Ng==\",\n \"title\": \"Revenge of the Sith\",\n \"episodeID\": 3,\n \"director\": \"George Lucas\",\n \"starCount\": 410,\n \"rating\": 4.1\n }\n ]\n }\n }\n}"
}
]
},
{
"name": "film",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query film ($id: String) {\n film (id: $id) {\n id\n title\n episodeID\n director\n starCount\n rating\n }\n}",
"variables": "{\n \"id\": \"\"\n}"
}
},
"url": {
"raw": "http://film",
"protocol": "http",
"host": [
"film"
]
}
},
"response": [
{
"name": "film ZmlsbXM6MQ==",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query film ($id: String) {\n film (id: $id) {\n id\n title\n episodeID\n director\n starCount\n rating\n }\n}",
"variables": "{\n \"id\": \"ZmlsbXM6MQ==\"\n}"
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [],
"body": "{\n \"data\": {\n \"film\": {\n \"id\": \"ZmlsbXM6MQ==\",\n \"title\": \"A New Hope\",\n \"episodeID\": 4,\n \"director\": \"George Lucas\",\n \"starCount\": 432,\n \"rating\": 4.3\n }\n }\n}"
},
{
"name": "film ZmlsbXM6Mg==",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query film ($id: String) {\n film (id: $id) {\n id\n title\n episodeID\n director\n starCount\n rating\n }\n}",
"variables": "{\n \"id\": \"ZmlsbXM6Mg==\"\n}"
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [],
"body": "{\n \"data\": {\n \"film\": {\n \"id\": \"ZmlsbXM6Mg==\",\n \"title\": \"The Empire Strikes Back\",\n \"episodeID\": 5,\n \"director\": \"Irvin Kershner\",\n \"starCount\": 433,\n \"rating\": 4.3\n }\n }\n}"
}
]
}
]
},
{
"name": "mutations",
"item": [
{
"name": "addStar",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation AddStar($filmId: String) {\n addStar(filmId: $filmId) {\n id\n starCount\n rating\n }\n}",
"variables": "{\n \"filmId\": \"\"\n}"
}
},
"url": {
"raw": "http://addStar",
"protocol": "http",
"host": [
"addStar"
]
}
},
"response": [
{
"name": "addStar to ZmlsbXM6Mg==",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation AddStar($filmId: String) {\n addStar(filmId: $filmId) {\n id\n title\n episodeID\n director\n starCount\n rating\n }\n}",
"variables": "{\n \"filmId\": \"ZmlsbXM6Mg==\"\n}"
}
},
"url": {
"raw": "http://addStar",
"protocol": "http",
"host": [
"addStar"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [],
"body": "{\n \"data\": {\n \"addStar\": {\n \"id\": \"ZmlsbXM6Mg==\",\n \"title\": \"The Empire Strikes Back\",\n \"episodeID\": 5,\n \"director\": \"Irvin Kershner\",\n \"starCount\": 434,\n \"rating\": 4.3\n }\n }\n}"
}
]
},
{
"name": "addReview",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "http://addReview",
"protocol": "http",
"host": [
"addReview"
]
}
},
"response": [
{
"name": "addReview to ZmlsbXM6Mg==",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation AddReview($filmId: String, $review: Review) {\n addReview(filmId: $filmId, review: $review) {\n id\n title\n episodeID\n director\n starCount\n rating\n }\n}\n",
"variables": "{\n \"filmId\": \"ZmlsbXM6Mg==\",\n \"review\": {\n \"comment\": \"Awesome!\",\n \"rating\": 5\n }\n}\n"
}
},
"url": {
"raw": "http://addReview",
"protocol": "http",
"host": [
"addReview"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [],
"body": "{\n \"data\": {\n \"addReview\": {\n \"id\": \"ZmlsbXM6Mg==\",\n \"title\": \"The Empire Strikes Back\",\n \"episodeID\": 5,\n \"director\": \"Irvin Kershner\",\n \"starCount\": 433,\n \"rating\": 4.4\n }\n }\n}"
}
]
}
]
}
],
"variable": [
{
"key": "url",
"value": "",
"type": "any",
"description": "URL for the request."
}
]
}