1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
3
exports [` middlewares/batch option \` allowMutations\` should batch mutations if \` allowMutations=true\` 1` ] = `
4
- Object {
5
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " mutation {}\\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " mutation {}\\ " , \\ " variables \\ " :{}}]" ,
6
- " headers" : Object {
4
+ {
5
+ " body" : " [{" id " : " 1 " , " query " : " mutation {}" , " variables " :{}},{" id " : " 2 " , " query " : " mutation {}" , " variables " :{}}]" ,
6
+ " headers" : {
7
7
" Accept" : " */*" ,
8
8
" Content-Type" : " application/json" ,
9
9
},
@@ -13,24 +13,24 @@ Object {
13
13
` ;
14
14
15
15
exports [` middlewares/batch option \` allowMutations\` should not batch mutations by default 1` ] = `
16
- Array [
17
- Array [
16
+ [
17
+ [
18
18
"/graphql",
19
- Object {
20
- " body" : " {\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " mutation {}\\ " , \\ " variables \\ " :{}}" ,
21
- " headers" : Object {
19
+ {
20
+ " body" : " {" id " : " 1 " , " query " : " mutation {}" , " variables " :{}}" ,
21
+ " headers" : {
22
22
" Accept" : " */*" ,
23
23
" Content-Type" : " application/json" ,
24
24
},
25
25
" method" : " POST" ,
26
26
" signal" : AbortSignal {},
27
27
} ,
28
28
],
29
- Array [
29
+ [
30
30
"/graphql",
31
- Object {
32
- " body" : " {\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " mutation {}\\ " , \\ " variables \\ " :{}}" ,
33
- " headers" : Object {
31
+ {
32
+ " body" : " {" id " : " 1 " , " query " : " mutation {}" , " variables " :{}}" ,
33
+ " headers" : {
34
34
" Accept" : " */*" ,
35
35
" Content-Type" : " application/json" ,
36
36
},
@@ -42,9 +42,9 @@ Array [
42
42
` ;
43
43
44
44
exports [` middlewares/batch option \` batchTimeout\` should gather different requests into one batch request 1` ] = `
45
- Object {
46
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 3 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
47
- " headers" : Object {
45
+ {
46
+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 3 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
47
+ " headers" : {
48
48
" Accept" : " */*" ,
49
49
" Content-Type" : " application/json" ,
50
50
},
@@ -54,24 +54,24 @@ Object {
54
54
` ;
55
55
56
56
exports [` middlewares/batch option \` batchTimeout\` should gather different requests into two batch request 1` ] = `
57
- Array [
58
- Array [
57
+ [
58
+ [
59
59
"/graphql/batch",
60
- Object {
61
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 4 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
62
- " headers" : Object {
60
+ {
61
+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 4 " , " query " : " " , " variables " :{}}]" ,
62
+ " headers" : {
63
63
" Accept" : " */*" ,
64
64
" Content-Type" : " application/json" ,
65
65
},
66
66
" method" : " POST" ,
67
67
" url" : " /graphql/batch" ,
68
68
} ,
69
69
],
70
- Array [
70
+ [
71
71
"/graphql/batch",
72
- Object {
73
- " body" : " [{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 3 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
74
- " headers" : Object {
72
+ {
73
+ " body" : " [{" id " : " 2 " , " query " : " " , " variables " :{}},{" id " : " 3 " , " query " : " " , " variables " :{}}]" ,
74
+ " headers" : {
75
75
" Accept" : " */*" ,
76
76
" Content-Type" : " application/json" ,
77
77
},
@@ -83,9 +83,9 @@ Array [
83
83
` ;
84
84
85
85
exports [` middlewares/batch should handle network failure 1` ] = `
86
- Object {
87
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
88
- " headers" : Object {
86
+ {
87
+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
88
+ " headers" : {
89
89
" Accept" : " */*" ,
90
90
" Content-Type" : " application/json" ,
91
91
},
@@ -95,9 +95,9 @@ Object {
95
95
` ;
96
96
97
97
exports [` middlewares/batch should handle responses without payload wrapper 1` ] = `
98
- Object {
99
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
100
- " headers" : Object {
98
+ {
99
+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
100
+ " headers" : {
101
101
" Accept" : " */*" ,
102
102
" Content-Type" : " application/json" ,
103
103
},
@@ -107,9 +107,9 @@ Object {
107
107
` ;
108
108
109
109
exports [` middlewares/batch should handle server errors for all requests 1` ] = `
110
- Object {
111
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 3 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
112
- " headers" : Object {
110
+ {
111
+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}},{" id " : " 3 " , " query " : " " , " variables " :{}}]" ,
112
+ " headers" : {
113
113
" Accept" : " */*" ,
114
114
" Content-Type" : " application/json" ,
115
115
},
@@ -119,9 +119,9 @@ Object {
119
119
` ;
120
120
121
121
exports [` middlewares/batch should handle server errors for one request 1` ] = `
122
- Object {
123
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
124
- " headers" : Object {
122
+ {
123
+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
124
+ " headers" : {
125
125
" Accept" : " */*" ,
126
126
" Content-Type" : " application/json" ,
127
127
},
@@ -131,9 +131,9 @@ Object {
131
131
` ;
132
132
133
133
exports [` middlewares/batch should make a successfull single request 1` ] = `
134
- Object {
135
- " body" : " {\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}" ,
136
- " headers" : Object {
134
+ {
135
+ " body" : " {" id " : " 1 " , " query " : " " , " variables " :{}}" ,
136
+ " headers" : {
137
137
" Accept" : " */*" ,
138
138
" Content-Type" : " application/json" ,
139
139
},
@@ -143,9 +143,9 @@ Object {
143
143
` ;
144
144
145
145
exports [` middlewares/batch should make a successfully batch request 1` ] = `
146
- Object {
147
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
148
- " headers" : Object {
146
+ {
147
+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
148
+ " headers" : {
149
149
" Accept" : " */*" ,
150
150
" Content-Type" : " application/json" ,
151
151
},
@@ -155,9 +155,9 @@ Object {
155
155
` ;
156
156
157
157
exports [` middlewares/batch should make a successfully batch request with duplicate request payloads 1` ] = `
158
- Object {
159
- " body" : " [{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " duplicate \\ " , \\ " variables \\ " :{\\ " duplicate \\ " :true}}]" ,
160
- " headers" : Object {
158
+ {
159
+ " body" : " [{" id " : " 2 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " duplicate " , " variables " :{" duplicate " :true}}]" ,
160
+ " headers" : {
161
161
" Accept" : " */*" ,
162
162
" Content-Type" : " application/json" ,
163
163
},
@@ -167,9 +167,9 @@ Object {
167
167
` ;
168
168
169
169
exports [` middlewares/batch should reject if server does not return response for duplicate request payloads 1` ] = `
170
- Object {
171
- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 3 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
172
- " headers" : Object {
170
+ {
171
+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}},{" id " : " 3 " , " query " : " " , " variables " :{}}]" ,
172
+ " headers" : {
173
173
" Accept" : " */*" ,
174
174
" Content-Type" : " application/json" ,
175
175
},
0 commit comments