# WPGraphQL Content Blocks

`meteorgpl-plugin/wp-graphql-content-blocks` — a WordPress plugin as a Composer package.

Extends WPGraphQL to support querying (Gutenberg) Blocks as data.

- Author: WP Engine — https://wpengine.com/
- License: GPL-2.0-or-later (profile: gpl-full)
- Buy a license from the vendor: see the vendor's site
- Latest version: 4.8.4 (2025-06-12)
- Page: https://meteorgpl.com/packages/meteorgpl-plugin/wp-graphql-content-blocks
- Requires WordPress: 5.7
- Tested up to WordPress: 6.8.1
- Requires PHP: 7.4
- Vendor: WP Engine — https://meteorgpl.com/vendors/wpengine.com

## About

Extends WPGraphQL to support querying (Gutenberg) Blocks as data.

## Changelog

### 4.8.4

### Patch Changes

- 43cef3d: Tested WordPress 6.8.1 and fixed a release issue with the plugin artifact

### 4.8.3

### Patch Changes

- bf77481: Updated plugin test suite and readme for WordPress 6.8
- bb3631c: Adds WPGraphQL version compatibility headers and checks

### 4.8.2

### Patch Changes

- afd2458: bug: Fixes fatal error on the Site Health page for the info tab. Caused by a naming of the wrong object key in the Semver package.

[View the full changelog](https://github.com/wpengine/wp-graphql-content-blocks/blob/main/CHANGELOG.md)

### 4.2.0

### Minor Changes

- 766737d: fix: cleanup constants and refactor autoload handling to improve Composer compatibility.
- 7514021: chore: Update Composer dev-dependencies to their latest (semver-compatible) versions.
- b64583f: dev: Add `wpgraphql_content_blocks_pre_resolve_blocks` and `wp_graphql_content_blocks_resolve_blocks` filters.
- 179948c: dev: make `PluginUpdater` namespaced functions PSR-4 compatible.
- bced76d: feat: expose `EditorBlock.type` field

### Patch Changes

- de885f1: Skip the Sonar Qube workflow if the user that opened the PR is not a member of the Github org
- 6ced628: Fix: prevent fatal errors when get_current_screen() is unset.
- 58b6792: chore: remediate non-code PHPStan errors in phpstan-baseline.neon
- c3e11b1: ci: test against WordPress 6.6
- 27f459f: tests: fix PHP deprecation notices
- 4f4b851: tests: fix order of expected/actual values passed to asserts.
- 89b6c60: tests: lint and format PHPUnit tests
- 65f0c2d: Update @since @todo tags and @todo placeholders in \_deprecated_function calls

### 4.1.0

### Minor Changes

- 6241c4e: fix: prevent fatal errors by improving type-safety and returning early when parsing HTML.
  The following methods have been deprecated for their stricter-typed counterparts:
  - `DOMHelpers::parseAttribute()` => `::parse_attribute()`
  - `DOMHelpers::parseFirstNodeAttribute()` => `::parse_first_node_attribute()`
  - `DOMHelpers::parseHTML()` => `::parse_html()`
  - `DOMHelpers::getElementsFromHTML()` => `::get_elements_from_html()`
  - `DOMHelpers::parseText()` => `::parse_text()`
  - `DOMHelpers::findNodes()`=> `::find_nodes()`

### Patch Changes

- 2b947dc: chore: update Composer dev-dependencies and fix resulting issues.
- 205da8c: ci: replace `docker-compose` commands with `docker compose`
- 5c21ce3: Bug fix. Reusable block isn't resolved inside innerBlocks.

Full changelog: https://meteorgpl.com/packages/meteorgpl-plugin/wp-graphql-content-blocks/changelog

## Install

```sh
composer config repositories.meteorgpl composer https://composer.meteorgpl.com
composer require meteorgpl-plugin/wp-graphql-content-blocks
```

The repository needs a token (see https://meteorgpl.com/docs). The vendor's license checks are intact: activate the plugin in WordPress with a key bought from the vendor.

## Versions

| Version | Released | Size | SHA-256 | Status |
| --- | --- | --- | --- | --- |
| 4.8.4 | 2025-06-12 | 107.3 KB | e3598d78118064a2ef0a5c5ea76376a227f373d7946d4e8d4d307e23bc348021 | verified |
| 4.2.0 | 2024-09-19 | 122.8 KB | f71154f45052850ade5d44a9dcbc9459819fa4807c3c2d549fbfed44d1e044a6 | verified |

