Skip to content

Redirect queries when resolving uris. #53

@justlevine

Description

@justlevine

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions