WP Manifestindependent plugin directory
manifest / developer / sw-acf-options-graphql

SW - ACF Options GraphQL

Dynamically exposes all ACF Options Page field groups via WPGraphQL with Polylang language support.

by Seniors · github.com/dazza-dev/sw-acf-options-graphql · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/dazza-dev/sw-acf-options-graphql/archive/refs/heads/main.zip

Readme

=== SW - ACF Options GraphQL === Contributors: seniors Tags: acf, wpgraphql, polylang, options-page, headless Requires at least: 5.8 Tested up to: 6.7 Requires PHP: 7.4 Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html

Dynamically exposes all ACF Options Page field groups via WPGraphQL with Polylang language support.

== Description ==

This plugin bridges ACF Options Pages with WPGraphQL and Polylang, enabling translated options page fields in a headless WordPress setup.

It automatically discovers all ACF field groups assigned to Options Pages and registers them as root query fields in WPGraphQL, each with a language argument for Polylang translation support.

How it works:

  • Scans all ACF field groups with options_page location rules
  • For each group, registers a GraphQL object type and root query field
  • Uses the ACF graphql_field_name (or generates one from the group title)
  • Sets Polylang language context before resolving fields via get_field()
  • Works with ACF Options for Polylang for per-language option values

Example query:

{ sectionHeaders(language: ES) { featuresTitle featuresSubtitle plansTitle plansSubtitle } }

== Requirements ==

== Installation ==

  1. Upload the sw-acf-options-graphql folder to /wp-content/plugins/
  2. Activate the plugin through the "Plugins" menu in WordPress
  3. Ensure ACF Options Pages have field groups with "Show in GraphQL" enabled
  4. Query your options via WPGraphQL with the language argument

== Changelog ==

= 1.0.0 =

  • Initial release
  • Dynamic field group discovery from ACF Options Pages
  • Polylang language support via acf-options-for-polylang
  • Automatic snake_case to camelCase field name conversion
  • ACF field type to GraphQL scalar type mapping

Read the full README on GitHub →