[WordPress] 外掛分享: WPGraphQL for ACF

WordPress 外掛 WPGraphQL for ACF 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「WPGraphQL for ACF」是 2023-12-18 上架。
  • 目前有 5000 個安裝啟用數。
  • 上一次更新是 2024-07-25,距離現在已有 282 天。
  • 外掛最低要求 WordPress 5.9 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.3 以上。
  • 有 1 人給過評分。
  • 論壇上目前有 1 個提問,問題解答率 0%

外掛協作開發者

jasonbahl |

外掛標籤

acf | api | nextjs | GraphQL | headless |

內容簡介

- WPGraphQL for Advanced Custom Fields 是一個免費的開源 WordPress 外掛,將 ACF Fields 和 Field Groups 添加到 WPGraphQL Schema 中。
- 創建 ACF Field Groups:使用 ACF 用户界面或者在 PHP 中註冊它們,或者利用 ACF 本地 JSON。每個 field group 和其中的 fields 都可以配置為「在 GraphQL 中顯示」。
- 使用 GraphQL 查詢你的 fields:一旦你的 field groups 和 fields 配置為「在 GraphQL 中顯示」,它們就可以在 GraphQL Schema 中進行查詢。
- 支持的 Field Types:WPGraphQL for ACF 支持大多數 ACF (免費和 PRO) 的內置 field types,並擴展到 ACF Extended (免費和 PRO) 的大多數 field types。
- 更新:如果你正在從 WPGraphQL for ACF v0.6.* 或更舊版本進行更新,請查看升級指南。對於非主要版本的更新,自動更新通常應該順利進行,但我們仍建議在測試環境中備份站點並進行測試。
- 支持:一般幫助請求可以在 Github 討論區中創建新主題。WPGraphQL Slack 是即時溝通的好地方。報告 WPGraphQL 的 bug。提出關於 WPGraphQL 的想法、功能或增強建議。報告安全漏洞。

FAQs:
- 這支插件可以與 ACF Extended 一起使用嗎?是的!WPGraphQL for ACF 允許你查詢由 ACF Extended 創建的(大多數)fields。
- 我可以使用 WPGraphQL for ACF 通過 ACF Fields 進行查詢篩選和排序嗎?目前,WPGraphQL for ACF 不支持通過 ACF Fields 進行查詢篩選和排序。由於「元查詢」的執行成本通常很高,所以我們目前不支持默認的 ACF field 篩選,但我們正在探索在沒有性能懲罰的情況下支持篩選的選項。
- 我發現了一個 bug,我應該在哪裡報告?如果你認為自己發現了一個 bug,请在 GitHub 上提出問題。你在問題中提供的細節越多,你的重現步驟越清楚,我們能提供幫助的機會就越高。
- 我可以在 WPGraphQL for ACF 中使用 ACF Free 或 Pro 嗎?是的!WPGraphQL for ACF 與 ACF Free 和 Pro 配合使用效果很好。ACF Pro 版本具有一些附加功能,如靈活的內容字段、重複器字段和選項頁,這些功能都得到 WPGraphQL for ACF 的支持。
- 我必須使用 Faust.js 才能使用 WPGraphQL for ACF 嗎?不用!雖然 wpgraphql.com 和 acf.wpgraphql.com 是使用 Faust.js 和 Next.js 构建的,但你可以使用 WPGraphQL for ACF 與任何 GraphQL 客戶端(包括 Apollo、Relay、Urql 等)一起使用。
- 我有一個 ACF 擴展,它添加了一個新的字段類型,它能與 WPGraphQL for ACF 一起使用嗎?WPGraphQL for ACF 支持 ACF(免費和 PRO)提供的字段類型,以及 ACF Extended(免費和 PRO)提供的字段類型。可以通過使用「register_graphql_acf_field_type」API 添加對其他字段類型的支持。
- 是否需要 WPGraphQL 和 ACF 一起使用這個插件?這個插件是一個「橋接」插件,將 ACF 的功能帶到 WPGraphQL 中。在你的 WordPress 安裝中,WPGraphQL 和 ACF 都需要被安裝並啟用才能使用這個插件。
- WPGraphQL for ACF 多少錢?WPGraphQL for ACF 是一個免費的開源插件。它的開發由 WP Engine Atlas 贊助。
- WPGraphQL for ACF 支持 GraphQL Mutations 嗎?目前還不支持 GraphQL Mutations。我們正在努力在將來添加對 Mutations 的支持。在我們添加支持之前,我們正在等待 GraphQL「@oneOf」指令被合併到 GraphQL 規範中。

原文外掛簡介

WPGraphQL for Advanced Custom Fields is a free, open-source WordPress plugin that adds ACF Fields and Field Groups to the WPGraphQL Schema.
Create ACF Field Groups
Create ACF Field Groups and Fields using the ACF User Interface, register them with PHP, or leverage ACF local JSON. Each field group and the fields within it can be configured to “Show in GraphQL.”
Query your fields with GraphQL
Once your field groups and fields are configured to “Show in GraphQL,” they become available in the GraphQL Schema for querying.
Supported Field Types
WPGraphQL for ACF provides support for most built-in field types of ACF (free & PRO) and extends support to most field types from ACF Extended (free & PRO).
Updating
If you are updating from WPGraphQL for ACF v0.6.* or older, check out the Upgrade Guide
For non-major version updates, automatic updates usually should work smoothly, but we still recommend you back up your site and test on a staging site.
Before updating WPGraphQL for ACF, review the release notes on GitHub.
We follow Semantic Versioning (Semver) for meaningful releases:

MAJOR version for incompatible API changes,
MINOR version for backwards-compatible functionality additions,
PATCH version for backwards-compatible bug fixes.

Learn more about Semver at semver.org.
Support

General Help Requests: For general questions and help requests, create a new topic in Github Discussions
Slack Community: The WPGraphQL Slack is a great place to communicate in real-time. Ask questions, discuss features, get to know other folks using WPGraphQL.
Bug Reports: Report a bug in WPGraphQL
Feature Requests: Suggest an idea, feature, or enhancement for WPGraphQL.
Report a Security Vulnerability: Report a security vulnerability.

FAQs
Does this work with ACF Extended?
Yes! WPGraphQL for ACF allows you to query for (most) fields created with ACF Extended.
Can I filter and sort queries by ACF Fields using WPGraphQL for ACF?
At this time WPGraphQL for ACF does not support filtering or sorting queries by ACF Fields. “Meta Queries” are often very expensive to execute, so we currently do not support filtering by ACF fields out of the box, but are exploring options for supporting it without the performance penalty.
I think I found a bug, where do I report it?
If you think you found a bug, please open an issue on GitHub. The more details you provide in the issue, and the more clear your steps to reproduce are, the higher chances we will be able to help.
Can I use ACF Free or Pro with WPGraphQL for ACF?
Yes! WPGraphQL for ACF works great with ACF Free and Pro. The Pro version of ACF has some additional features, such as Flexible Content Fields, Repeater Fields and Options Pages that are supported by WPGraphQL for ACF.
Do I have to use Faust.js to use WPGraphQL for ACF?
No! While wpgraphql.com and acf.wpgraphql.com are built using Faust.js and Next.js, you can use WPGraphQL for ACF with any GraphQL client, including Apollo, Relay, Urql, etc.
I have an ACF Extension that adds a new field type, will it work with WPGraphQL for ACF?
WPGraphQL for ACF supports the field types that come with ACF (Free and PRO) as well as the field types in ACF Extended (Free and PRO). Support for additional field types can be added by using the “register_graphql_acf_field_type” API.
Do I need WPGraphQL and ACF to be active to use this?
This plugin is a “bridge” plugin that brings functionality of ACF to WPGraphQL. Both WPGraphQL and ACF need to be installed and active in your WordPress installation for this plugin to work.
How much does WPGraphQL for ACF cost?
WPGraphQL for ACF is a FREE open-source plugin. The development is sponsored by WP Engine Atlas.
Does WPGraphQL for ACF support GraphQL Mutations?
GraphQL Mutations are not yet supported. We are working on adding support for Mutations in the future. We are waiting for the GraphQL “@oneOf” directive to be merged into the GraphQL spec before we add support for Mutations.
Does this work with Field Groups registered in PHP or JSON?
Yes! You can register ACF Field Groups and Fields using the Admin UI, PHP or JSON. WPGraphQL for ACF will detect the Field Groups and Fields and add them to the GraphQL Schema. If using PHP or JSON, you will need to set the “show_in_graphql” setting to “true” to expose the Field Group and Fields to the GraphQL Schema. There might be other settings that need attention at the field group or field level that might impact the schema or field resolution.
Privacy Policy
WPGraphQL for Advanced Custom Fields uses Appsero SDK to collect telemetry data upon user confirmation, helping us troubleshoot problems and improve the product.
The Appsero SDK doesn’t collect data by default and only starts gathering basic telemetry data when a user allows it via the admin notice. No data is collected without user consent.
Learn more about how Appsero collects and uses data.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WPGraphQL for ACF」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


2.0.0 | 2.1.0 | 2.1.1 | 2.1.2 | 2.2.0 | 2.3.0 | 2.4.0 | 2.4.1 | trunk | 2.0.0-beta.7.0.0 |

延伸相關外掛(你可能也想知道)

  • On-Demand Revalidation 》這是一個 WordPress 外掛的描述:「Next.js On-Demand Revalidation for WordPress」。它可以在文章更新時,讓它們具有即時重新驗證的能力,並且可以針對特定...。
  • Jamstack Preview and Deployments 》此外掛讓您可以從 WordPress 管理介面預覽 JAMstack 網站並從 WordPress 管理介面開始建置。, 注意:此外掛並不會自動使您的 Web 應用程式預覽功能運作。您仍...。
  • Frontend View For Headless CMS 》以下是提供的網站外掛摘要:, - 這個外掛將後端 WordPress 文章、頁面、自訂文章類型、分類和分類連結到 Next.js 前端網站。, , ### 問題與答案:, - 誰開...。
  • Decoupled Preview 》這款 WordPress 外掛可以在多個拆解前端中提供預覽,並且可以與 Decoupled Kit Next.js WordPress Starter 一起使用,提供預先配置的文章和頁面內容。它還具...。

文章
Filter
Apply Filters
Mastodon