diff --git a/src/class-config.php b/src/class-config.php index 6053398..9b65eba 100644 --- a/src/class-config.php +++ b/src/class-config.php @@ -633,7 +633,18 @@ protected function register_graphql_field( string $type_name, string $field_name $field_config['type'] = 'Float'; break; case 'true_false': - $field_config['type'] = 'Boolean'; + $field_config = [ + 'type' => 'Boolean', + 'resolve' => function ($root, $args, $context, $info) use ($acf_field) { + + $value = $this->get_acf_field_value($root, $acf_field, true); + if (empty($value)) { + $value = false; + } + + return $value; + } + ]; break; case 'date_picker': case 'time_picker':