Description
versions:
WP 5.8.1
Woo 5.8.0
Graphql 1.6.5
WPGraphQL WooCommerce 0.10.4
Advanced Custom Fields PRO 5.10.2
WPGraphQL for Advanced Custom Fields 0.5.3
Steps:
- I'm having a CPT - Auctions
- Auction has an ACF Relationship field with Products
- when I'm running the following query - I'm receiving an error
QUERY:
query GET_AUCTIONS {
auctions {
nodes {
title
acf_auctions {
auctionProduct {
... on SimpleProduct {
id
name
databaseId
commentCount
}
}
}
}
}
}
ERROR:
{
"errors": [
{
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 6,
"column": 9
}
],
"path": [
"auctions",
"nodes",
1,
"acf_auctions",
"auctionProduct",
0
]
}
],
"data": {
"auctions": {
"nodes": [
{
"title": "Auction 2",
"acf_auctions": {
"auctionProduct": null
}
},
{
"title": "Auction 1",
"acf_auctions": {
"auctionProduct": [
null
]
}
}
]
}
},
"extensions": {
"debug": [
{
"type": "DEBUG_LOGS_INACTIVE",
"message": "GraphQL Debug logging is not active. To see debug logs, GRAPHQL_DEBUG must be enabled."
}
]
}
}
Activity
ardiewen commentedon Oct 18, 2021
Hi @vstrelianyi can you post your Custom Field configuration? I'm wondering if you have the
Select multiple values?
option enabled.vstrelianyi commentedon Oct 18, 2021
Hi @ardiewen !
should I check for this option in ACF field configuration?
vstrelianyi commentedon Oct 18, 2021
vstrelianyi commentedon Oct 18, 2021
yes, you can select several options

vstrelianyi commentedon Oct 18, 2021
btw I have found the same issue here in acf graphql plugin repo
wp-graphql/wp-graphql-acf#155
ardiewen commentedon Oct 18, 2021
Yeah interesting... definitely related to the acf schema filter as mentioned in the other post. However the solve seems to be on this repo. I will see if I can test a potential fix.
vstrelianyi commentedon Oct 18, 2021
That would be great! Thx a lot!
ardiewen commentedon Oct 19, 2021
Hi @vstrelianyi, you'll need two PRs to fix the issue:
#568 on this repo
wp-graphql/wp-graphql-acf#297 on the acf plugin repo
Please note the following:
This will only be a temp fix due to significant breaking changes in wp-graphql-acf in v0.6.0
You MUST set a "Filter by Post Type" like you have in your screenshot. Failing to do so will cause the default type of your field to become
PostObjectUnion
which will cause conflicts withwp-graphql-woocommerce
and consequently throw an error.vstrelianyi commentedon Oct 19, 2021
Ok. will try that!, thx!
so wp-graphql-acf v0.6.0 is on the way?
CesarBenavides777 commentedon Sep 24, 2022
I think only
https://github.com/wp-graphql/wp-graphql-acf/pull/297 on the acf plugin repo
this edit is needed now thankfully.kidunot89 commentedon Feb 7, 2023
@vstrelianyi @CesarBenavides777 @ardiewen @asmartbear Is this still an issue in
v0.12.1
?3 remaining items