Skip to content

Looking up a node by nodeByUri for a translated permalink #45

Description

@williamjulianvicary

We have hit an issue where some of our custom post types have translated permalinks/slugs, an example query is below, the URI being passed is the relative path on the current page (i.e ///).

Example that works (non-translated):

  • /pagetype/pageslug

Examples that do not work:

It's as if the WPGraphQL plugin is not aware of any translated URIs on any custom post types. It DOES work for translated page URIs but not for any custom post types.

I've looked through open issues but can't see anything that stands out currently but possibly some related issues - does anyone have any clever ideas of how we can query these pages? We're using FaustJS and it has a seed query which it uses to resolve the correct template and appropriate document ID for the given URI so at present this is a bit of a blocker!

GraphQL to reproduce (pass in a URI):

query MyQuery($uri: String!) {
  node: nodeByUri(uri: $uri) {
    ...NodeByUri
  }
}

fragment NodeByUri on UniformResourceIdentifiable {
  __typename
  uri
  id
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions