wp-graphql-polylang
wp-graphql-polylang copied to clipboard
Retrieving trashed post translation causing error
Hello, im trying to retrieve translations on post with uri which does not have a translation and it's giving me the following internal server error
post(id: "xyz", idType: URI) {
id
language {
locale
}
translations {
link
language {
locale
}
uri
}
}
when i remove uri from the graphql, the query returns fine. If theres a translation against the post, the query works fine.
"errors": [
{
"message": "Internal server error",
"path": [
"wpgraphqlbuildings",
"post",
"translations",
0,
"uri"
],
This error appears in the graphqli of the gatsby project but it works fine on the graphqli on the wp blog, could it be cache issue?
Graphql & Response on wp blog graphqli
post(id: "xyz", idType: URI) {
language {
locale
}
translations {
language {
locale
}
uri
status
}
}
Response:
{
"data": {
"post": {
"language": {
"locale": "en_US"
},
"translations": [
{
"language": {
"locale": "ar"
},
"uri": "ar/__trashed-16/",
"status": "trash"
}
]
}
}
}