From 62038bd2a96c1a770623f87e387e1e809b67f6a9 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 11 Oct 2022 12:32:04 +1300 Subject: [PATCH] Passthru JSON objects --- src/Appwrite/GraphQL/TypeMapper.php | 2 -- src/Appwrite/GraphQL/Types/Json.php | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/GraphQL/TypeMapper.php b/src/Appwrite/GraphQL/TypeMapper.php index f998e4f331..29d3d92063 100644 --- a/src/Appwrite/GraphQL/TypeMapper.php +++ b/src/Appwrite/GraphQL/TypeMapper.php @@ -445,8 +445,6 @@ class TypeMapper private static function getHashOptionsImplementation(array $object): Type { - \var_dump($object); - switch ($object['type']) { case 'argon2': return static::fromResponseModel('AlgoArgon2'); diff --git a/src/Appwrite/GraphQL/Types/Json.php b/src/Appwrite/GraphQL/Types/Json.php index 2ebf2d39b0..f5bb8d629b 100644 --- a/src/Appwrite/GraphQL/Types/Json.php +++ b/src/Appwrite/GraphQL/Types/Json.php @@ -21,12 +21,12 @@ class Json extends ScalarType public function serialize($value) { - return \json_encode($value); + return $value; } public function parseValue($value) { - return \json_decode($value, associative: true); + return $value; } public function parseLiteral(Node $valueNode, ?array $variables = null)