File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,12 @@ Move the location of the `text` field when exposing the query plan and fill it w
172
172
173
173
By [ @bnjjj ] ( https://github.com/bnjjj ) in https://github.com/apollographql/router/pull/1557
174
174
175
+ ### Formatting problem fix of scalar fields selected several times ([ PR #1583 ] ( https://github.com/apollographql/router/issues/1583 ) )
176
+
177
+ Fixed a bug where querying scalar fields several times would put ` null ` s instead of expected values.
178
+
179
+ By [ @eole1712 ] ( https://github.com/eole1712 ) in https://github.com/apollographql/router/pull/1585
180
+
175
181
### Fix typo on HTTP errors from subgraph ([ #1593 ] ( https://github.com/apollographql/router/pull/1593 ) )
176
182
177
183
Remove the closed parenthesis at the end of error messages resulting from HTTP errors from subgraphs.
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ impl Query {
244
244
// we cannot know about the expected format of custom scalars
245
245
// so we must pass them directly to the client
246
246
if schema. custom_scalars . contains ( type_name) {
247
- * output = input. take ( ) ;
247
+ * output = input. clone ( ) ;
248
248
return Ok ( ( ) ) ;
249
249
} else if let Some ( enum_type) = schema. enums . get ( type_name) {
250
250
return match input. as_str ( ) {
@@ -1339,6 +1339,32 @@ mod tests {
1339
1339
) ;
1340
1340
}
1341
1341
1342
+ #[ test]
1343
+ fn reformat_response_array_of_scalar_duplicate_key ( ) {
1344
+ assert_format_response ! (
1345
+ "type Query {
1346
+ get: Thing
1347
+ }
1348
+ type Thing {
1349
+ array: [Int]
1350
+ }
1351
+
1352
+ " ,
1353
+ "{get {array array}}" ,
1354
+ json! { {
1355
+ "get" : {
1356
+ "array" : [ 1 , 2 , 3 , 4 ] ,
1357
+ } ,
1358
+ } } ,
1359
+ None ,
1360
+ json! { {
1361
+ "get" : {
1362
+ "array" : [ 1 , 2 , 3 , 4 ] ,
1363
+ } ,
1364
+ } } ,
1365
+ ) ;
1366
+ }
1367
+
1342
1368
#[ test]
1343
1369
fn reformat_response_array_of_type_simple ( ) {
1344
1370
assert_format_response ! (
You can’t perform that action at this time.
0 commit comments