Map.php in GraphQL 8.3
File
modules/graphql_core/src/Plugin/GraphQL/Scalars/TypedData/Map.php
View source
<?php
namespace Drupal\graphql_core\Plugin\GraphQL\Scalars\TypedData;
use Drupal\graphql\Plugin\GraphQL\Scalars\ScalarPluginBase;
class Map extends ScalarPluginBase {
public static function serialize($value) {
return $value;
}
public static function parseValue($value) {
return json_decode($value, TRUE);
}
public static function parseLiteral($ast) {
return json_decode($ast->value, TRUE);
}
}
Classes
Name |
Description |
Map |
Plugin annotation
@GraphQLScalar(
id = "map",
name = "Map",
type = "map"
) |