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,24 +13,24 @@ 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" ,
2626 " signal" : AbortSignal {},
2727 } ,
2828 ],
29- Array [
29+ [
3030 "/graphql",
31- Object {
32- " body" : " {\\ " id \\ " : \\ " 1 \\ " , \\ " query \\ " : \\ " mutation {}\\ " , \\ " variables \\ " :{}}" ,
33- " headers" : Object {
31+ {
32+ " body" : " {" id " : " 1 " , " query " : " mutation {}" , " variables " :{}}" ,
33+ " headers" : {
3434 " Accept" : " */*" ,
3535 " Content-Type" : " application/json" ,
3636 },
@@ -42,9 +42,9 @@ Array [
4242` ;
4343
4444exports [` 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" : {
4848 " Accept" : " */*" ,
4949 " Content-Type" : " application/json" ,
5050 },
@@ -54,24 +54,24 @@ Object {
5454` ;
5555
5656exports [` middlewares/batch option \` batchTimeout\` should gather different requests into two batch request 1` ] = `
57- Array [
58- Array [
57+ [
58+ [
5959 "/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" : {
6363 " Accept" : " */*" ,
6464 " Content-Type" : " application/json" ,
6565 },
6666 " method" : " POST" ,
6767 " url" : " /graphql/batch" ,
6868 } ,
6969 ],
70- Array [
70+ [
7171 "/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" : {
7575 " Accept" : " */*" ,
7676 " Content-Type" : " application/json" ,
7777 },
@@ -83,9 +83,9 @@ Array [
8383` ;
8484
8585exports [` 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" : {
8989 " Accept" : " */*" ,
9090 " Content-Type" : " application/json" ,
9191 },
@@ -95,9 +95,9 @@ Object {
9595` ;
9696
9797exports [` 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" : {
101101 " Accept" : " */*" ,
102102 " Content-Type" : " application/json" ,
103103 },
@@ -107,9 +107,9 @@ Object {
107107` ;
108108
109109exports [` 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" : {
113113 " Accept" : " */*" ,
114114 " Content-Type" : " application/json" ,
115115 },
@@ -119,9 +119,9 @@ Object {
119119` ;
120120
121121exports [` 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" : {
125125 " Accept" : " */*" ,
126126 " Content-Type" : " application/json" ,
127127 },
@@ -131,9 +131,9 @@ Object {
131131` ;
132132
133133exports [` 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" : {
137137 " Accept" : " */*" ,
138138 " Content-Type" : " application/json" ,
139139 },
@@ -143,9 +143,9 @@ Object {
143143` ;
144144
145145exports [` 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" : {
149149 " Accept" : " */*" ,
150150 " Content-Type" : " application/json" ,
151151 },
@@ -155,9 +155,9 @@ Object {
155155` ;
156156
157157exports [` 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" : {
161161 " Accept" : " */*" ,
162162 " Content-Type" : " application/json" ,
163163 },
@@ -167,9 +167,9 @@ Object {
167167` ;
168168
169169exports [` 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" : {
173173 " Accept" : " */*" ,
174174 " Content-Type" : " application/json" ,
175175 },
0 commit comments