WP Manifestindependent plugin directory
manifest / integrations / wp-graphql-crb

WP GraphQL Carbon Fields WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Wordpress wrapper to expose Carbon Fields to WpGraphQL queries.

★ 24stars
0.0.7latest · 2 years ago

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/matepaiva/wp-graphql-crb/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A Wordpress wrapper to expose Carbon Fields to WpGraphQL queries.

Important

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 post_meta, term_meta, user_meta, comment_meta or theme_options.

Note: This is a very experimental version, so it is probably shipped with bugs.

Usage

  1. First you have to install Carbon Fields and WpGraphQL.
  2. Then install this package via packagist: composer require matepaiva/wp-graphql-crb
  3. Wrap every Carbon Field container that you want to expose via GraphQL with the static method WpGraphQLCrb\Container::register. For example:
  <?php

  use WpGraphQLCrb\Container as WpGraphQLCrbContainer;
  use Carbon_Fields\Container\Container;
  use Carbon_Fields\Field\Field;

  WpGraphQLCrbContainer::register(
    Container::make('term_meta', __('Custom Data', 'app'))
      ->where('term_taxonomy', '=', 'category')
      ->add_fields([
        Field::make('image', 'crb_img')
          ->set_value_type('url')
      ])
  );
  1. Now the query below will work:
{
  categories {
    edges {
      node {
        id
        crb_img
      }
    }
  }
}

About Theme Options

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.

Releases

4 releases.

Tag
Published
0.0.7 latest
Feb 18, 2024 2 years ago
May 26, 2021 5 years ago
Mar 9, 2021 5 years ago
Mar 8, 2021 5 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

WP GraphQL Carbon Fields 1.0.0 · audited by WP Registry

No security issues found.

Audited release
1.0.0
Findings
none
Worst severity
—
Content hash
cb5a6c89c79429382bceb6b3…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.