WPGraphQL for ACF is a FREE, open source WordPress plugin that exposes ACF Field Groups and Fields to the WPGraphQL Schema, enabling powerful decoupled solutions with modern frontends.
query GetPostWithAcfFields($id: ID!) { nodeByUri(uri: $id) { __typename uri ...on NodeWithTitle { title } ...on WithAcfMyFieldGroup { myFieldGroup { textField numberField } }}
All ACF Field Groups set to "show in graphql" are added to the GraphQL Schema, and share an "AcfFieldGroup" Interface
<p>Each ACF Field Group is represented by a GraphQL Type. And each Location where a field group is assigned implements a WithAcf* Interface. This allows ACF Field Groups to be easily coupled with components and re-used.</p>
Create ACF Field Groups
Each ACF Field Group that is set to "show_in_graphql" will be added to the GraphQL Schema and will have a corresponding GraphQL Object Type that implements the "AcfFieldGroup" Interface.
Use GraphQL Queries and Fragments
WPGraphQL for ACF Adds GraphQL Object Types and Interfaces for each field group. This enables each component to specify the exact data it needs using GraphQL Queries and Fragments.
Use the data from GraphQL in your Components
Components can use the data from GraphQL to render the data in the front-end. You can use any front-end framework you like, or even no framework at all)
Each ACF Field Group that is set to "show_in_graphql" will be added to the GraphQL Schema and will have a corresponding GraphQL Object Type that implements the "AcfFieldGroup" Interface.
WPGraphQL for ACF Adds GraphQL Object Types and Interfaces for each field group. This enables each component to specify the exact data it needs using GraphQL Queries and Fragments.
Components can use the data from GraphQL to render the data in the front-end. You can use any front-end framework you like, or even no framework at all)
WPGraphQL for ACF has built-in support for ACF (FREE & PRO) field types, including repeaters, flexible content, clone fields and more. It also supports most field types of ACF Extended (FREE & PRO). For field types that are not natively supported, we have created an API that allows developers to add support for them.
These are some common questions we get asked. If you have any other questions, please check out the documentation or join our Slack community.