wp-graphql-acf
wp-graphql-acf copied to clipboard
How to expose custom acf field to wp-graphql?
I installed this extension (https://github.com/ildrm/acf-jalalidatepicker) to add a custom datepicker to ACF. This is working fine, but I don't know how to enable the "Show in GraphQl" thing like other fields. Any help is appreciated! 😸
@ShahriarKh Did you manage to resolve this? Got any tips?
@raulclaudino Unfortunately, not yet.
I would love to get some help on this matter. I can't find documentation on what to add to my custom field for it to be found in Graphql Schema
I also need to add a custom field. Been struggling to find a solution.
👋🏻 We're re-building this plugin over here: https://github.com/wp-graphql/wpgraphql-acf and in the new version we have a new API for mapping ACF Field Types to the GraphQL Schema.
The new version of the plugin has built-in support for ACF Extended (free and PRO), which uses the new API for mapping custom ACF Field Types to the GraphQL Schema.
It's not fully documented yet, but you can see plenty of examples of using the new register_graphql_acf_field_type() API in this directory: https://github.com/wp-graphql/wpgraphql-acf/tree/main/src/ThirdParty/AcfExtended
Here's also a GIST showing how @CesarBenavides777 mapped the ACF Table field type to the GraphQL Schema: https://gist.github.com/CesarBenavides777/79b158db8355ddbc349fbf9b3272ae47