Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent wpml from redirecting in WPGraphQL requests #3058

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

jasonbahl
Copy link
Collaborator

What does this implement/fix? Explain your changes.

This adds a filter to prevent WPML from redirecting within WPGraphQL requests.

Also, this tests the modified Github Workflow intended to run phpcbf to fix changes and commit them back to the PR.

Does this close any currently open issues?

no

Any other comments?

I've referred folks to this snippet many times. Adding it to core leads to a reduced support burden.

…e github workflow will properly fix and commit (I probably should test this on another repo but yolo)
@jasonbahl jasonbahl added the WPML label Feb 22, 2024
@jasonbahl jasonbahl self-assigned this Feb 22, 2024
@jasonbahl jasonbahl closed this Feb 22, 2024
@jasonbahl jasonbahl reopened this Feb 22, 2024
@jasonbahl jasonbahl closed this Feb 22, 2024
@jasonbahl jasonbahl reopened this Feb 22, 2024
@jasonbahl jasonbahl closed this Feb 22, 2024
@jasonbahl jasonbahl reopened this Feb 22, 2024
Copy link

codeclimate bot commented Feb 22, 2024

Code Climate has analyzed commit 088a06b and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@justlevine
Copy link
Collaborator

I've referred folks to this snippet many times. Adding it to core leads to a reduced support burden.

Even still, wouldn't the official WPML GraphQL extension be a better place for this?

@jasonbahl
Copy link
Collaborator Author

@justlevine the problem happens when you have WPGraphQL active and WPML active even if you're not using WPML features in GraphQL.

Just having WPML active has prevented a lot of users from accessing data from GraphQL until this is implemented.

Some users have deactivated WPGraphQL thinking it just doesn't work at all because their first attempt at using it was a failure.

I think intentional features of having WPML work with WPGraphQL belong in that extension but simply being able to coexist and WPGraphQL work normally feels like a small piece of tech debt we can take on with the trade off of reduced support and improved first time user experience. 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants