Choice Fields Should return key and value, not just value #105
Labels
needs: discussion
Requires a discussion to proceed
type: enhancement
Improvements to existing functionality
What problem does this address?
Currently when querying a choice field, such as checkbox, select, or radio, only the value is returned.
i.e.
Some users would like to be able to query these fields and have both the label and value of the choice returned.
i.e (mocked example).
What is your proposed solution?
I have 2 ideas:
label
andvalue
field. (this would be a breaking change)What alternatives have you considered?
We could document how folks can do this via hooks/filters and leave default behavior as-is 🤷🏻
Additional Context
related: wp-graphql/wp-graphql-acf#44
The text was updated successfully, but these errors were encountered: