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

Assets and localizations #195

Closed
akiarostami opened this issue May 26, 2021 · 2 comments
Closed

Assets and localizations #195

akiarostami opened this issue May 26, 2021 · 2 comments

Comments

@akiarostami
Copy link

akiarostami commented May 26, 2021

Hi,

We just moved our content from another CMS to GraphCMS, and we love it! But we just ran into a major issue that we can't figure out how to resolve.

We have many models and almost all of them have images (assets). We also have 2 locales. Our site is build with Gatsby and we use gatsby-source-graphcms.

All fields without "enabled localisation" return their default value, which is exactly what we expect. However, localisation is enabled for Assets by default and we can't turn it off, and they don't seem to have a fallback. How can we get the image (assets) value for non-default locales?

Your documentation here specifically says:

If localized assets are not added, then the fallback (default locale) asset will be served where applicable.

which is exactly what I need, but I can't get the fallback to default locale.

Thank you.

@notrab
Copy link
Contributor

notrab commented Jun 8, 2021

@akiarostami Perhaps @jpedroschmitz can help out on this one - if he's any experience.

It's been a while since I used this plugin but from what I recall some Gatsby limitations would require you to overwrite the Gatsby resolver for the plugin to fetch what you need.

Since Gatsby creates its own GraphQL layer, it doesn't work the same way as GraphCMS does.

@notrab
Copy link
Contributor

notrab commented Jun 9, 2021

Perhaps this issue will give you more context on this: #164

@notrab notrab closed this as completed Jun 9, 2021
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