Skip to content
Discussion options

You must be logged in to vote

WPGraphQL returns an ACF select field (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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kevinchamplin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant