$valueNode of type GraphQL\Language\AST\Node is incompatible with the type iterable expected by parameter $nodes of GraphQL\Error\Error::__construct().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
22
throw new Error('JSON fields are not searchable', /** @scrutinizer ignore-type */ $valueNode);
Loading history...
23
}
24
25
/**
26
* @return mixed[]|null
27
*
28
* @throws Error
29
*/
30
public function parseValue(mixed $value): array|null
31
{
32
if (! is_string($value)) {
33
throw new Error('Json is not a string: ' . $value);
34
}
35
36
return json_decode($value, true);
37
}
38
39
public function serialize(mixed $value): string|null