Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/quiet-walls-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wpengine/wpgraphql-logging-wordpress-plugin": major
---

chore: Initial release of WPGraphQL Logging Plugin.
13 changes: 3 additions & 10 deletions plugins/wpgraphql-logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,8 @@ A logging plugin that provides visibility into request lifecycle to help quickly
[![Code Coverage](https://img.shields.io/badge/coverage-%3E90%25-brightgreen?label=Code%20Coverage)](https://github.com/wpengine/hwptoolkit/actions)
[![Code Quality](https://github.com/wpengine/hwptoolkit/actions/workflows/code-quality.yml/badge.svg)](https://github.com/wpengine/hwptoolkit/actions/workflows/code-quality.yml)


-----

> [!CAUTION]
> This plugin is currently in a beta state. It's still under active development, so you may encounter bugs or incomplete features. Updates will be rolled out regularly. Use with caution and provide feedback if possible. You can create an issue at [https://github.com/wpengine/hwptoolkit/issues](https://github.com/wpengine/hwptoolkit/issues)

-----

## Overview


WPGraphQL Logging plugin provides observability and visibility into the GraphQL request and event lifecycle. This capability gives users the understandability needed to quickly identify and resolve performance issues and bottlenecks within their headless WordPress application.

### Key Features
Expand All @@ -46,7 +37,9 @@ WPGraphQL Logging plugin provides observability and visibility into the GraphQL

### Option 1: Plugin Zip

You can get the latest release from <https://github.com/wpengine/hwptoolkit/releases?q=wpgraphql-logging&expanded=true>.
You can get the latest release here - <https://github.com/wpengine/hwptoolkit/releases/latest/download/wpgraphql-logging.zip>

You can also download it from our release page - <https://github.com/wpengine/hwptoolkit/releases>

### Option 2: Composer

Expand Down
22 changes: 10 additions & 12 deletions plugins/wpgraphql-logging/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ WPGraphQL Logging plugin provides observability and visibility into the GraphQL

**WPGraphQL Logging** is a comprehensive logging solution for WPGraphQL that tracks and records GraphQL query execution, providing developers with detailed insights into query performance, errors, and request lifecycle events.

**Note:** This plugin is currently in BETA. While it is functional and ready for testing, some features may be subject to change based on community feedback.

= Key Features =

**GraphQL Request Lifecycle Logging**
Expand Down Expand Up @@ -74,14 +72,14 @@ For detailed documentation, guides, and examples, visit the [GitHub repository](

1. Upload the plugin files to `/wp-content/plugins/wpgraphql-logging/`, or install the plugin through the WordPress plugins screen directly
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Navigate to Settings > WPGraphQL Logging in the WordPress admin to configure settings
4. View logged queries can be found in GraphQL Logs
3. Navigate to GraphQL Logs -> Settings in the WordPress admin to configure settings
4. View logged queries can be found in GraphQL Logs -> All Logs.

== Frequently Asked Questions ==

= Is this plugin production-ready? =

This plugin is currently in BETA. It is functional and ready for testing in staging environments. We recommend thorough testing before deploying to production.
Yes. We recommend thorough testing on a local or staging before deploying to production. By default the plugin will only log 10% of the initial requests.

= Does this plugin affect GraphQL query performance? =

Expand All @@ -99,17 +97,14 @@ Yes, the plugin provides extensive hooks and filters to customize logging behavi

The plugin includes configurable data retention settings. You can set automatic cleanup rules to delete logs older than a specified number of days.

== Screenshots ==
= Where can I find documentation? =
For detailed usage instructions, developer references, and examples, please visit the [Documentation](https://github.com/wpengine/hwptoolkit/blob/main/docs/plugins/wpgraphql-logging/index.md) folder included with this plugin.

1. View all GraphQL query logs with filtering and search
2. Detailed log entry view showing query, variables, and response
3. Configuration settings for data retention and logging behavior
4. Export logs to CSV for analysis

== Changelog ==

= 0.1.0 - 2025-01-22 =
* Initial BETA release
= 1.0.0 - 2025-11-14 =
* Initial release
* Core logging functionality for WPGraphQL request lifecycle
* Admin interface for viewing and filtering logs
* CSV export functionality
Expand All @@ -119,6 +114,9 @@ The plugin includes configurable data retention settings. You can set automatic

== Upgrade Notice ==

= 1.0.0 =
Initial release.

= 0.1.0 =
Initial BETA release.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ public static function get_schema(): string {
*/
public static function get_table_name(): string {
global $wpdb;
// @TODO - Check for multisite
return $wpdb->prefix . 'wpgraphql_logging';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ public function test_column_cb_returns_checkbox_for_valid_item(): void {

$result = $this->list_table->column_cb($entity);

$this->assertStringContainsString('<input type="checkbox"', $result);
$this->assertStringContainsString('<label class="screen-reader-text"', $result);
$this->assertStringContainsString('Select log entry 123', $result);
$this->assertStringContainsString('<input id="cb-select-123" type="checkbox"', $result);
$this->assertStringContainsString('value="123"', $result);
}

Expand Down
Loading