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.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/dazza-dev/sw-acf-options-graphql/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

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