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

Redirect queries when resolving uris. #53

Open
justlevine opened this issue Jun 12, 2023 · 0 comments
Open

Redirect queries when resolving uris. #53

justlevine opened this issue Jun 12, 2023 · 0 comments
Labels
status: confirmed 📍 The issue has been confirmed and reproduced. type: enhancement ⚡ Improves on an existing feature
Milestone

Comments

@justlevine
Copy link
Member

What problem does this address?

While #52 adds the ability to query for redirections from the schema, querying for the redirected URI doesn't fetch the redirected object. This is because the Rank Math Redirector class (like most of the plugin) only operates on the global query/request.

What is your proposed solution?

We need to filter graphql_pre_resolve_uri and check if the provided URI matches any redirections.

This will either require a change in Rank Math core or a local shim of the entire Redirector class.

What alternatives have you considered?

The existing approach is to use frontend redirects (e.g. https://nextjs.org/docs/pages/api-reference/next-config-js/redirects).

Additional Context

Something that needs to be solved is how/where to send redirects that are not ContentNode types. See #2491

@justlevine justlevine added status: confirmed 📍 The issue has been confirmed and reproduced. type: enhancement ⚡ Improves on an existing feature labels Jun 12, 2023
@justlevine justlevine added this to the Future milestone Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed 📍 The issue has been confirmed and reproduced. type: enhancement ⚡ Improves on an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant