wp-graphql / wp-graphql-acf

WPGraphQL for Advanced Custom Fields
https://wpgraphql.com/acf
627 stars 123 forks source link

Post object as draft return null value which causes internal server error #379

Closed jakubnakielskixebia closed 9 months ago

jakubnakielskixebia commented 9 months ago

Similar to issue #173 but with Post Object field type. When we'll pick post which is not published, GraphQL returns 500 Internal Server Error.

Screenshot 2024-01-30 at 14 38 16

jasonbahl commented 9 months ago

@jakubnakielskixebia This issue has been resolved in the new WPGraphQL for ACF v2.0.

You can find the new version on the WordPress.org repo: https://wordpress.org/plugins/wpgraphql-acf/

The upgrade guide is here: https://acf.wpgraphql.com/upgrade-guide/

I would encourage you to upgrade to the new version at your earliest convenience as it is the version we'll be supporting long term and this repo will be archived in the near future.

DevMude commented 9 months ago

@jasonbahl I have a large project on v0.6.1 of this plugin. Unfortunately it would simply take significantly longer to update the plugin to latest and adjust all my front-end code than to fix the issue myself.

It looks like it would require a change somewhere around here: https://github.com/wp-graphql/wp-graphql-acf/blob/8c6a18563bbc6dde276e1a09429b525df54fe2c2/src/class-config.php#L705 But I just don't know enough of the internals of how wp-graphql works to figure out a fix myself.

Could you please give me some pointers on how I might fix this one?