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

ACF Number Fields with "0" value return null #237

Closed
tomwhita opened this issue Mar 17, 2021 · 1 comment · May be fixed by #262
Closed

ACF Number Fields with "0" value return null #237

tomwhita opened this issue Mar 17, 2021 · 1 comment · May be fixed by #262
Assignees
Labels

Comments

@tomwhita
Copy link

System Info:

  • ACF Pro v5.9.3
  • WPGraphQL v1.2.5
  • WP Gatsby v0.9.2
  • WPGraphQL for Advanced Custom Fields v0.4.0

To reproduce:

  • Using ACF Pro create a field group for posts and add a number field to the group
  • Set the field value on a post to 0
  • Using Graphiql, query for the post and custom field. The value should return as null
@tomwhita tomwhita changed the title ACF Number Fields with "0" value return null ACF Number Fields with "0" value return null Mar 17, 2021
@jasonbahl jasonbahl transferred this issue from wp-graphql/wp-graphql Mar 19, 2021
@bhardie bhardie added this to the Schema Inconsistencies milestone Apr 20, 2021
@jasonbahl
Copy link
Contributor

This is fixed in the upcoming WPGraphQL v0.6.0 (#262)

Before

Querying a number field with a value of 0 returns null.

Screen Shot 2021-05-13 at 12 48 53 PM

After

Querying a number field with a value of 0 properly returns 0

Screen Shot 2021-05-13 at 12 47 54 PM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants