-
Notifications
You must be signed in to change notification settings - Fork 123
Multiple values Post Object ACF field not working #45
Comments
Is anyone looking at this? I'm also having this issue. |
I've actually done a (pretty obvious) workaround in case anyone sees this. Just put a single post object into a repeater. Works fine. |
I have been having the same issue, I have a group of fields exposed to GraphQL, each field in the group is a Post Object field type allowing multiple id's to be stored, when accessing this user meta via GraphQL the query always returns null, at this point I can't change the fields as per @cordial suggested above as we are to far into the dev process to change this, has anybody got round this issue or looking into it as it is blocking further development on this area of the project. Thanks for your time. Charlie |
im having the same issue i have a repeater field that I want to be able to add multiple "Project" custom post types using Post Object and all I can see is expected This should give me access to the post object and i should be able to use it this way or am I missing something? Any help appreciated. |
Does using a repeater not work for you or fit your needs? My workaround, described above fixed my issue which looks the same as yours (i couldnt find a way of fixing it the original way that worked). |
I got it working using the above plugin |
Ah ok, cool! |
This has been resolved for quite some time. To reproduce: Add ACF FieldI created an ACF Field of the "Post Object" field type, and set it to allow multiple selections Edit Post with FieldThen I edited a post with this field on it, selecting multiple post objects Query the fieldThen I queried the field: v0.5.2In WPGraphQL for ACF v0.5.2, I queried like so: {
post(id: 2179, idType: DATABASE_ID) {
id
databaseId
postTest {
multiSelectPostObjectField {
__typename
... on Post {
id
title
}
}
}
}
} v0.6.0The upcoming v0.6.0 (#262) is making some changes to the behavior with the {
post(id: 2179, idType: DATABASE_ID) {
id
databaseId
postTest {
multiSelectPostObjectField {
nodes {
__typename
id
databaseId
}
}
}
}
} |
Originally posted here: wp-graphql/wp-graphql#939
When using a multiple values Post Object ACF field, WPGraphQL return an empty object instead of the list of post objects.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: