Skip to content

Commit 573153e

Browse files
bozzbotfubhy
authored andcommitted
Do not serialize Map types at all to prevent unnecessary parsing at destination. (#728)
1 parent 59b9759 commit 573153e

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • modules/graphql_core/src/Plugin/GraphQL/Scalars/TypedData

modules/graphql_core/src/Plugin/GraphQL/Scalars/TypedData/Map.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ class Map extends ScalarPluginBase {
1717
* {@inheritdoc}
1818
*/
1919
public static function serialize($value) {
20-
if (is_array($value)) {
21-
return json_encode($value);
22-
}
23-
24-
return NULL;
20+
return $value;
2521
}
2622

2723
/**

0 commit comments

Comments
 (0)