My team has a headless WP instance running ACF Pro and the WPGraphQL plugin.
The other day there was a git conflict in the ACF JSON files. The dev accidentally ended up deleting a field that was in our GraphQL Fragment for a particular field type, and any POST request to the /graphql endpoint was returning a 500 error. We couldn’t get much from the logs, but it appears the issue was that our Fragment was requesting a field that was no longer present, but the error was simply a 500.
I’m curious if there’s a way for me to dig into it a bit more in terms of seeing that this was the issue in the logs and/or I am looking for a way to validate my GraphQL Fragments when the ACF custom field is being updated. They have a ton of great hooks available on save\_post, which makes me believe that something like this exists, but perhaps, because of my naivety around GraphQL this is a silly request to make, in which case, what is a better way to help ensure this doesn’t happen again going forward?
[ad_2]