-
Notifications
You must be signed in to change notification settings - Fork 19
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
Looking up a node by nodeByUri for a translated permalink #45
Comments
@williamjulianvicary Just ran into this same issue. Curious if you came up with a viable solution. I'll look into it as well and let you know if I come across anything 👍 |
We solved this by:
However WPML does now have a native GQL extension: https://wpml.org/documentation/related-projects/wpml-graphql/ so I presume this is solved in that extension? |
Thanks so much for the response, this is really helpful. For our particular needs, I realized we can perform a post query and if that returns null, we can do a fallback page query with the uri. You just blew my mind with the native WPML GQL extension. That's amazing news, thank you for passing that on. I look forward to digging into that - hopefully it will resolve some of the issues we've been running into. |
Hi, was this issue resolved? I'm facing it now. |
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):
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):
The text was updated successfully, but these errors were encountered: