Skip to content

Commit

Permalink
Merge pull request #71 from wp-graphql/fix/#70-graphql-description-de…
Browse files Browse the repository at this point in the history
…fault-value-incorrect

fix: graphql_description default value incorrect
  • Loading branch information
jasonbahl authored Aug 3, 2023
2 parents c318a73 + 3b0a3b0 commit 6f81e4f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/AcfGraphQLFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,6 @@ public function get_admin_field_settings( array $field, Settings $settings ) {

$default_admin_settings = [];

// If there's a description provided, use it.
if ( ! empty( $field['graphql_description'] ) ) {
$description = $field['graphql_description'];

// fallback to the fields instructions
} elseif ( ! empty( $field['instructions'] ) ) {
$description = $field['instructions'];
}

$default_admin_settings['show_in_graphql'] = [
'label' => __( 'Show in GraphQL', 'wp-graphql-acf' ),
'instructions' => __( 'Whether the field should be queryable via GraphQL. NOTE: Changing this to false for existing field can cause a breaking change to the GraphQL Schema. Proceed with caution.', 'wp-graphql-acf' ),
Expand All @@ -125,7 +116,6 @@ public function get_admin_field_settings( array $field, Settings $settings ) {
'ui' => true,
'default_value' => null,
'placeholder' => __( 'Explanation of how this field should be used in the GraphQL Schema', 'wp-graphql-acf' ),
'value' => ! empty( $description ) ? $description : null,
'conditions' => [
'field' => 'show_in_graphql',
'operator' => '==',
Expand Down

0 comments on commit 6f81e4f

Please sign in to comment.