AdvancedCustomFields / AdvancedCustomFields/acf
User field stopped showing in GraphQL query
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
User field type stopped surfacing populated values to GraphQL
To Reproduce
Steps to reproduce the behavior:
- Add a User Field Type to a Field Group that appears on Posts
- In a post, add a user to the field and save
- Refresh and see that the user is visibly saved to the field
- Go to GraphQL IDE and query for the field group + user field on the post
- See that the query returns
nullor empty[]array
Expected behavior
The saved user value should show in the GraphQL query and not just the post editing interface
Screenshots or Video
https://www.loom.com/share/4af11b22f39745909505d3635c1b0750?sid=c1e06f9d-f83d-4e62-97ec-f92e51577e84
Code
acf-export-2024-06-11.json
Version Information:
- WPEngine hosted [PAID]
- WordPress Version [6.4.3]
- PHP Version [8.0.2]
- ACF Version [ACF Free 6.3.1]
- WPGraphQL for ACF [2.2.0]
- WPGraphQL [1.27.0]
- Browser [Chrome 125.0.6422.142]
Additional context
This was working about a week ago? Sometime, roughly in the past 2 weeks, it stopped on all authors but one. One user comes through to the query—the rest don't. All plugins above were updated to latest today.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached acf-export-2024-06-11.json and reproduce the User Field Type on a post, then query the field group and user field in the GraphQL IDE. Compare the saved value in the post editing interface with the returned null or empty array; done means all saved users are returned by the GraphQL query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, php, wordpress
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100