11// Jest Snapshot v1, https://goo.gl/fbAQLP
22
33exports [` 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" : {
77 " Accept" : " */*" ,
88 " Content-Type" : " application/json" ,
99 },
@@ -13,38 +13,36 @@ Object {
1313` ;
1414
1515exports [` middlewares/batch option \` allowMutations\` should not batch mutations by default 1` ] = `
16- Array [
17- Array [
16+ [
17+ [
1818 "/graphql",
19- Object {
20- " body" : " {\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " mutation {}\\ " , \\ " variables \\ " :{}}" ,
21- " headers" : Object {
19+ {
20+ " body" : " {" id " : " 1 " , " query " : " mutation {}" , " variables " :{}}" ,
21+ " headers" : {
2222 " Accept" : " */*" ,
2323 " Content-Type" : " application/json" ,
2424 },
2525 " method" : " POST" ,
26- " signal" : AbortSignal {},
2726 } ,
2827 ],
29- Array [
28+ [
3029 "/graphql",
31- Object {
32- " body" : " {\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " mutation {}\\ " , \\ " variables \\ " :{}}" ,
33- " headers" : Object {
30+ {
31+ " body" : " {" id " : " 1 " , " query " : " mutation {}" , " variables " :{}}" ,
32+ " headers" : {
3433 " Accept" : " */*" ,
3534 " Content-Type" : " application/json" ,
3635 },
3736 " method" : " POST" ,
38- " signal" : AbortSignal {},
3937 } ,
4038 ],
4139]
4240` ;
4341
4442exports [` 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 {
43+ {
44+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 3 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
45+ " headers" : {
4846 " Accept" : " */*" ,
4947 " Content-Type" : " application/json" ,
5048 },
@@ -54,24 +52,24 @@ Object {
5452` ;
5553
5654exports [` middlewares/batch option \` batchTimeout\` should gather different requests into two batch request 1` ] = `
57- Array [
58- Array [
55+ [
56+ [
5957 "/graphql/batch",
60- Object {
61- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 4 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
62- " headers" : Object {
58+ {
59+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 4 " , " query " : " " , " variables " :{}}]" ,
60+ " headers" : {
6361 " Accept" : " */*" ,
6462 " Content-Type" : " application/json" ,
6563 },
6664 " method" : " POST" ,
6765 " url" : " /graphql/batch" ,
6866 } ,
6967 ],
70- Array [
68+ [
7169 "/graphql/batch",
72- Object {
73- " body" : " [{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 3 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
74- " headers" : Object {
70+ {
71+ " body" : " [{" id " : " 2 " , " query " : " " , " variables " :{}},{" id " : " 3 " , " query " : " " , " variables " :{}}]" ,
72+ " headers" : {
7573 " Accept" : " */*" ,
7674 " Content-Type" : " application/json" ,
7775 },
@@ -83,9 +81,9 @@ Array [
8381` ;
8482
8583exports [` middlewares/batch should handle network failure 1` ] = `
86- Object {
87- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
88- " headers" : Object {
84+ {
85+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
86+ " headers" : {
8987 " Accept" : " */*" ,
9088 " Content-Type" : " application/json" ,
9189 },
@@ -95,9 +93,9 @@ Object {
9593` ;
9694
9795exports [` middlewares/batch should handle responses without payload wrapper 1` ] = `
98- Object {
99- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
100- " headers" : Object {
96+ {
97+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
98+ " headers" : {
10199 " Accept" : " */*" ,
102100 " Content-Type" : " application/json" ,
103101 },
@@ -107,9 +105,9 @@ Object {
107105` ;
108106
109107exports [` 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 {
108+ {
109+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}},{" id " : " 3 " , " query " : " " , " variables " :{}}]" ,
110+ " headers" : {
113111 " Accept" : " */*" ,
114112 " Content-Type" : " application/json" ,
115113 },
@@ -119,9 +117,9 @@ Object {
119117` ;
120118
121119exports [` 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 {
120+ {
121+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
122+ " headers" : {
125123 " Accept" : " */*" ,
126124 " Content-Type" : " application/json" ,
127125 },
@@ -131,21 +129,20 @@ Object {
131129` ;
132130
133131exports [` middlewares/batch should make a successfull single request 1` ] = `
134- Object {
135- " body" : " {\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}" ,
136- " headers" : Object {
132+ {
133+ " body" : " {" id " : " 1 " , " query " : " " , " variables " :{}}" ,
134+ " headers" : {
137135 " Accept" : " */*" ,
138136 " Content-Type" : " application/json" ,
139137 },
140138 " method" : " POST" ,
141- " signal" : AbortSignal {},
142139}
143140` ;
144141
145142exports [` middlewares/batch should make a successfully batch request 1` ] = `
146- Object {
147- " body" : " [{\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}},{\\ " id \\ " : \\ " 2 \\ " , \\ " query \\ " : \\ " \\ " , \\ " variables \\ " :{}}]" ,
148- " headers" : Object {
143+ {
144+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}}]" ,
145+ " headers" : {
149146 " Accept" : " */*" ,
150147 " Content-Type" : " application/json" ,
151148 },
@@ -155,9 +152,9 @@ Object {
155152` ;
156153
157154exports [` 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 {
155+ {
156+ " body" : " [{" id " : " 2 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " duplicate " , " variables " :{" duplicate " :true}}]" ,
157+ " headers" : {
161158 " Accept" : " */*" ,
162159 " Content-Type" : " application/json" ,
163160 },
@@ -167,9 +164,9 @@ Object {
167164` ;
168165
169166exports [` 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 {
167+ {
168+ " body" : " [{" id " : " 1 " , " query " : " " , " variables " :{}},{" id " : " 2 " , " query " : " " , " variables " :{}},{" id " : " 3 " , " query " : " " , " variables " :{}}]" ,
169+ " headers" : {
173170 " Accept" : " */*" ,
174171 " Content-Type" : " application/json" ,
175172 },
0 commit comments