Skip to content

Conversation

@justlevine
Copy link
Collaborator

@justlevine justlevine commented Apr 26, 2025

What does this implement/fix? Explain your changes.

This PR fixes a code quality bug where the do_graphql_request was incorrectly being called via add_filter() instead of add_action().

As a result of this change, the Tracing::init_trace() has been changed from returning a float unused by the application to returning void.

This is technically a breaking change, as that method is public, and the Tracing class is not marked final. However, there doesn't seem to be a way in WPGraphQL to replace this version with an extended version (unlike some other filterable classes).

Important

This PR is based on #3368 which should be merged first.

Relevant diff for this PR is: 3f0de23
Rebased ✔️

Does this close any currently open issues?

Not directly, but if we consider this a breaking change than it's part of #3370 . Converting the entire class to final would be part of that ticket for sure.

Any other comments?

@coveralls
Copy link

coveralls commented Apr 26, 2025

Coverage Status

coverage: 84.233% (-0.001%) from 84.234%
when pulling 42928b7 on justlevine:fix/do_graphql_request-action
into ea3ae61 on wp-graphql:develop.

@justlevine justlevine requested a review from jasonbahl April 26, 2025 12:13
@justlevine justlevine added status: in review Awaiting review before merging or closing needs: reviewer response This needs the attention of a codeowner or maintainer compat: possible break There is a possibility that this might lead to breaking changes, but not confirmed yet type: chore Maintenance tasks, refactoring, and other non-functional changes scope: code quality Refactoring, linting, and enforcing coding standards labels Apr 26, 2025
@justlevine justlevine force-pushed the fix/do_graphql_request-action branch from 62bf0a8 to 3f0de23 Compare April 29, 2025 05:12
@justlevine
Copy link
Collaborator Author

(Rebased on #3368 . Relevant diff is now: 3f0de23 )

@justlevine justlevine force-pushed the fix/do_graphql_request-action branch from 3f0de23 to 42928b7 Compare May 5, 2025 18:31
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 42928b7 and detected 0 issues on this pull request.

View more on Code Climate.

@jasonbahl jasonbahl merged commit fdac134 into wp-graphql:develop Jun 17, 2025
37 of 39 checks passed
@jasonbahl jasonbahl changed the title fix!: make Tracing::init_trace() void and call on add_action() fix: make Tracing::init_trace() void and call on add_action() Jun 18, 2025
pull bot pushed a commit to Zezo-Ai/wp-graphql that referenced this pull request Jul 15, 2025
pull bot pushed a commit to Zezo-Ai/wp-graphql that referenced this pull request Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compat: possible break There is a possibility that this might lead to breaking changes, but not confirmed yet needs: reviewer response This needs the attention of a codeowner or maintainer scope: code quality Refactoring, linting, and enforcing coding standards status: in review Awaiting review before merging or closing type: chore Maintenance tasks, refactoring, and other non-functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants