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

feat: add locale param option for gql #50

Open
gregghawes opened this issue Mar 23, 2022 · 5 comments
Open

feat: add locale param option for gql #50

gregghawes opened this issue Mar 23, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@gregghawes
Copy link

When translating my categories, quite a few are the same across different languages.

Would it be possible to have an option to allow duplicated slugs and a "locale" option in the findSlug graphql method?

@ComfortablyCoding
Copy link
Contributor

ComfortablyCoding commented Mar 25, 2022

If you set the slug field localization to disabled it should have the same value for all locales.

I will look into adding the locale param for gql. PRs are always welcome :)

@ComfortablyCoding ComfortablyCoding added the enhancement New feature or request label Apr 4, 2022
@ComfortablyCoding ComfortablyCoding changed the title Allow Duplicate Slugs and Add Locale to Graphql feat: add locale param option for gql May 17, 2022
@alexcho267
Copy link

Curious if there's been any movement on this or if anyone's found a solution. Cheers!

@ComfortablyCoding
Copy link
Contributor

No progress on it atm, I haven't had a chance to look into this yet.

Need to research on how we can check if i18n are enabled and content is localized.

Naive way would be to check if the plugin is installed but don't believe that's a guarantee.

@alexcho267
Copy link

alexcho267 commented Oct 12, 2022

Is there a way to use the pattern outlined here for GraphQL?

ComfortablyCoding added a commit that referenced this issue Oct 25, 2022
@ComfortablyCoding
Copy link
Contributor

ComfortablyCoding commented Oct 26, 2022

No, not in gql.

The problem with gql is that it's not so easy to do things dynamically due to the schema.

For example in this case, their is no way for me to dynamically define the locale param as being valid for one content type but not another. With REST I don't need to do any of that.

I will see if their is someway to incorporate the already existing filter support for the generated type but will need some investigation.

I already started work on it on the feat-gql-add-locale-support branch but it would be for all content types so not ideal.

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

No branches or pull requests

3 participants