Skip to content

Conversation

@colinmurphy
Copy link
Member

Description

This add the following default configuration upon activation if the configuration doesn't exist:

  • Enabled = true
  • Excluded Queries = __schema,GetSeedNode (for Faust and introspection queries)
  • Data Sampling = 10
  • Log All Events
  • Data Deletion set to 7 days
  • Data Sanitization enabled and use reccomended settings
Screenshot 2025-11-05 at 18 52 26 Screenshot 2025-11-05 at 18 52 39

Important

We needed to load the constants before activation/de-activation hooks as this caused a fatal error when trying to the option_key for a undefined constant.

Note

We will update the docs (and screenshots) as part of the task assigned for this.

Related Issue

Fixes #472

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?

Locally with WordPress 6.8.2 and Faust

Screenshots

Screenshot 2025-11-05 at 18 52 26 Screenshot 2025-11-05 at 18 52 39

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

Adds logic to set a default configuration when the plugin is activated, ensuring initial settings are present. Refactors ConfigurationHelper to remove unnecessary filters. Updates tests to verify default configuration is set on activation. Also ensures plugin constants are defined before activation/deactivation hooks are registered.
@changeset-bot
Copy link

changeset-bot bot commented Nov 5, 2025

🦋 Changeset detected

Latest commit: 8156902

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wpengine/wpgraphql-logging-wordpress-plugin Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link

github-actions bot commented Nov 5, 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

@colinmurphy colinmurphy marked this pull request as ready for review November 5, 2025 18:59
@colinmurphy colinmurphy requested a review from a team as a code owner November 5, 2025 18:59
@colinmurphy colinmurphy enabled auto-merge November 5, 2025 19:30
Copy link
Member

@ahuseyn ahuseyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great Colin 🚀

@colinmurphy colinmurphy added this pull request to the merge queue Nov 6, 2025
Merged via the queue into main with commit aafecfd Nov 6, 2025
21 checks passed
@colinmurphy colinmurphy deleted the chore-logging-plugin-default-configuration-on-activation branch November 6, 2025 08:44
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.

chore: Add default configuration for install of the logging plugin

3 participants