<?php
if (!defined('ABSPATH')) exit;
$act = get_option('active_plugins', []);
echo "PLUGINS:\n";
foreach ($act as $p) if (preg_match('/graphql|acf/i', $p)) echo "  $p\n";
foreach (['WPGRAPHQL_ACF_VERSION','WPGRAPHQL_VERSION','ACF_VERSION'] as $c) if (defined($c)) echo "  const $c=".constant($c)."\n";
echo "GROUPS for post:\n";
foreach (acf_get_field_groups(['post_type'=>'post']) as $g) {
  echo "  ".$g['key']
     ." | show_in_graphql=".(array_key_exists('show_in_graphql',$g)?var_export($g['show_in_graphql'],true):'UNSET')
     ." | gqlname=".($g['graphql_field_name'] ?? '-')
     ." | graphql_types=".(array_key_exists('graphql_types',$g)?json_encode($g['graphql_types']):'UNSET')
     ." | map_graphql=".(array_key_exists('map_graphql',$g)?var_export($g['map_graphql'],true):'UNSET')."\n";
}
