Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #334 from wp-graphql/revert-304-develop
Browse files Browse the repository at this point in the history
Revert "Returning false for true_false values"
  • Loading branch information
jasonbahl authored Sep 15, 2022
2 parents dc329aa + 2bd4316 commit 4fb24c0
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/class-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,7 @@ protected function register_graphql_field( string $type_name, string $field_name
$field_config['type'] = 'Float';
break;
case 'true_false':
$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;
}
];
$field_config['type'] = 'Boolean';
break;
case 'date_picker':
case 'time_picker':
Expand Down

0 comments on commit 4fb24c0

Please sign in to comment.