Title: WPGraphQL Support
Last modified: July 24, 2024

---

# WPGraphQL Support

 *  [toficofi](https://wordpress.org/support/users/toficofi/)
 * (@toficofi)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wpgraphql-support-3/)
 * Hi, are we getting first-party WPGraphQL support for Table fields?
 * Until then, this is what I’ve done:
 *     ```wp-block-code
       add_action( 'wpgraphql/acf/registry_init', function() {  register_graphql_acf_field_type( 'table', [    'graphql_type' => 'Table',    'resolve' => function ($root, $args, $context, $info, $field_type, $field_config ) {      $value = $field_config->resolve_field($root, $args, $context, $info);      if (is_null($value)) {        return null;      }      error_log(print_r($value, true));      return [        'header' => 1 == $value['use_header'] ? array_map(function ($th) {          return $th['c'];        }, $value['header']) : [],        'body' => array_map(function ($row) {          return array_map(function ($cell) {            return $cell['c'];          }, $row);        }, $value['body'])      ];    },  ]);});// Add Table-Typeadd_action('graphql_register_types', function () {  register_graphql_object_type('Table', [    'fields' => [      'header' => ['type' => ['list_of' => 'String']],      'body' => ['type' => ['list_of' => ['list_of' => 'String']]],    ],  ]);});
       ```
   

The topic ‘WPGraphQL Support’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields-table-field/assets/icon-256x256.png?
   rev=1962986)
 * [Table Field Add-on for ACF and SCF](https://wordpress.org/plugins/advanced-custom-fields-table-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields-table-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [toficofi](https://wordpress.org/support/users/toficofi/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/wpgraphql-support-3/)
 * Status: not resolved