I am using drupal 8 to build a headless page with gatsby and graphql.
How to query a translation of a page?
query MyQuery {
allNodePage {
nodes {
body {
value
}
}
}
}
I want to get this allNodePage.nodes.body.value in a specific language.
Edit: Here is the the graphiql allNodePage entity.
Edit_1:
According to this issue you can only query translations by modifying the api host-route (/fr/jsonapi/node/page) in drupal 8.
But in gatsby-source-drupal-plugin the api host route is not changeable in runtime.
Edit_2:
I try to translate a page node. Default language is english. I want to request the german translation which exists in drupal.

strapito maintain data. As mentioned above you only can translate content with/fr/jsonapi/node/pageoder/en/jsonapi/node/pagein drupal. Another possibility is to add values for each language in your model. For example title__en, title__fr or content__en, content__fr. - tomole