WPGraphQL for Carbon Fields
This FREE plugin from @matepaiva exposes fields registered using Carbon Fields to the WPGraphQL Schema
Community PluginView Plugin on Github
A Wordpress wrapper to expose Carbon Fields to WpGraphQL queries.
This is just the first version. There is a lot of work to be done. This packages exposes all the fields of the container, if the container type is
Note: This is a very experimental version, so it is probably shipped with bugs.
- First you have to install Carbon Fields and WpGraphQL.
- Then install this package via packagist:
composer require matepaiva/wp-graphql-crb
- Wrap every Carbon Field container that you want to expose via GraphQL with the static method
WpGraphQLCrb\Container::register. For example:
- Now the query below will work:
Theme options are not part of any structure already known by Wordpress, so it has its own root. Every
theme_options fields will be displayed in GraphQL as direct children of
crb_ThemeOptions. Be carefull about name collision.