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

Get single page by language #66

Open
simplenotezy opened this issue Jan 13, 2022 · 1 comment
Open

Get single page by language #66

simplenotezy opened this issue Jan 13, 2022 · 1 comment

Comments

@simplenotezy
Copy link

simplenotezy commented Jan 13, 2022

I believe this repository is missing the ability to specifiy language when fetching a single page/post. E.g.:

query Pages {
  page(id: "some-slug", idType: URI, language: EN) {
@ozcancelik
Copy link

I solved single post language issue with translation.
Example:

query getSinglePost {
    post(id: "lorem-ipsum", idType: SLUG) {
      translation(language: EN) {
        title
        content
        slug
      }
    }
  }

if you want to reach as variable use $language: LanguageCodeEnum!
I hope it helps someone.

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

No branches or pull requests

2 participants