wp-graphql-acf
wp-graphql-acf copied to clipboard
Added condition to relationships
using get_posts can be dangerous, since it returns the post regardless of wether the post is published or not. This was causing an issue when a related post was in draft or other mode.
I added as status check to the condition that check for instance of WP_Post before the post is added to $relationship. This has fixed the issue for me.