Add Translations
Adding a new language to an object is done via the updateObject
query, and takes the form of a “put” request (i.e no version number is supplied. See here.). If a version number and language is supplied to an update request and the language doesn’t exist, a NotFound
exception will be thrown as Skylark is trying to find a specific language version.
An object can be supplied with this request containing version 1 of the newly created language, if no episode data is supplied language version 1 will still be created but it will be empty.
Note that if any global metadata is supplied to the same request, the metadata versions will be processed and updated as normal.
In this example a new German translation is being created:
mutation updateEpisode {
updateEpisode(
uid: "68f2321c-73c5-4e76-8422-9eea3b7e7ede",
language: "de-DE",
episode: {
title: "Übersetzter Titel"
}
) {
# Return fields...
uid
}
}
Updated 6 months ago