Connect Hygraph
Import Hygraph content into transglot over GraphQL and write reviewed translations into each entry's target-locale localization.
| Direction | Two-way |
| Imported | The source-locale value of the localized fields you map, on the models you choose |
| Written back | Each entry's target-locale localization, created if it does not exist yet. The source locale is never written |
| Sync | Sync from CMS |
| Plan | Starter and above |
Before you start
- Add your target locales in the project's locale settings and mark the fields you want translated as localized. Hygraph's locale API IDs must match the language codes in your transglot project.
- Create a Permanent Auth Token with read and mutation permissions (including localizations) in the project's API access settings.
Connect
Open your project's settings, choose CMS, and pick Hygraph in the CMS list.
| Field | What to enter |
|---|---|
| Content API endpoint URL | Your project's High Performance or Content API URL, from the project's API access settings |
| Permanent Auth Token | The token you created |
| Content types | Singular model API IDs in PascalCase, comma separated, for example Post, Author |
| Translatable fields | Localized field API IDs, comma separated |
| Publish these locales | The target locales to write back |
Select Connect, then Test connection. The test runs a minimal GraphQL query against the endpoint.
transglot builds its queries from Hygraph's default names: the model Post is read through posts and post, and written with updatePost. Model, field and locale IDs may contain only letters, digits and underscores, and cannot start with a digit.
What gets imported
For each model, transglot queries the entries in your source locale and imports the mapped fields that hold text. When an entry has a title field, its value becomes the description on the entry's keys.
How translations are written back
Hygraph localizes whole entries rather than single fields. transglot runs one update mutation per entry that upserts the target-locale localizations with the reviewed values. A target locale that does not exist on the entry yet is created; one that exists is updated. The source localization is never addressed.
transglot does not run a publish mutation. Publish the entries in Hygraph when you want the translations live.
Troubleshooting
... the credentials were rejected.The token is wrong or lacks the permissions above.... the endpoint was not found, check the Content API URL.Check Content API endpoint URL.Hygraph rejected the GraphQL request. Check the model, field and locale mapping.A model or field ID does not exist, is not localized, or a locale is not set up in the project.The Hygraph connector cannot use the identifier [...] in a GraphQL query.A model, field or locale ID contains characters other than letters, digits and underscores.