Why is my ACF select field null in WPGraphQL even though it has a value? #35
Answered
by
Kevinchamplin
Kevinchamplin
asked this question in
Q&A
-
|
Why is my ACF select field null in WPGraphQL even though it has a value? |
Beta Was this translation helpful? Give feedback.
Answered by
Kevinchamplin
Jun 13, 2026
Replies: 1 comment
-
|
WPGraphQL returns an ACF |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kevinchamplin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WPGraphQL returns an ACF
selectfield (even a single-value one) as a list of strings, not a scalar. Reading it as a bare string yields null at render time. Type it as string[] and read [0] (e.g. project.projectFields.projectType?.[0]). The same applies to other ACF choice fields like a status select.