Skip to content

Conversation

@theodesp
Copy link
Member

@theodesp theodesp commented Oct 22, 2025

Description

This PR performs internal testing and validation of the WPGraphQL Logging Plugin to ensure it is ready for GA.

Fixes in the PR

  • Implemented BufferHandler to batch write database entries for performance
  • Added missing indexes for performance
  • Added filters for caching configuration
  • Better error handling

Related Issue

Dependant PRs

Type of Change

  • ✅ Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactoring (no functional changes)
  • 📄 Example update (no functional changes)
  • 📝 Documentation update
  • 🔍 Performance improvement
  • 🧪 Test update

How Has This Been Tested?

Screenshots

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the project's coding standards
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • Any dependent changes have been highlighted, merged or published

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2025

⚠️ No Changeset found

Latest commit: e921f18

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link

github-actions bot commented Oct 22, 2025

📦 Plugin Artifacts Ready!

Download from GitHub Actions run

Available plugins:

  • ✅ wpgraphql-logging.zip

See the "Artifacts" section at the bottom of the Actions run page

…cks.

Expanded and clarified the readme.txt with detailed features, requirements, installation, and FAQ for the WPGraphQL Logging plugin beta release. Updated contributor list, license, and tested PHP/WP versions. Added and improved PHPDoc blocks in templates and event class for consistency. Renamed TESTING.md to docs/how-to/run_tests.md for better documentation structure. Minor description update in main plugin file.
Renamed admin view template files to use the WPGraphQLLogger* naming convention for consistency. Updated all references in code, documentation, and psalm.xml to match the new filenames.
Wrap CACHE_DURATION in apply_filters to allow customization of the configuration cache duration via the 'wpgraphql_logging_config_cache_duration' filter.
Introduces a filter 'wpgraphql_logging_allowed_orderby_columns' to whitelist allowed columns for ORDER BY in find_logs() queries, enhancing security against SQL injection. Documentation updated with usage details and examples; code now validates both column and direction, falling back to defaults if invalid values are provided.
Introduces Monolog's BufferHandler for database logging and adds the 'wpgraphql_logging_default_buffer_limit' filter to customize buffer size. Updates tests to flush buffer before asserting log counts and documents the new filter. Also adds an index for 'level_name' in the database entity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants