Closed
Description
This is my query
query JobQuery {
objects {
getJob(objectId: "sqvJTrN9no") {
title
company {
name
}
countries
}
}
}
and it returns
{
"data": {
"objects": {
"getJob": {
"title": "Sales Assistant",
"company": {
"name": "Gulfstream Distribution"
},
"countries": [
{
"__type": "Pointer",
"className": "Country",
"objectId": "lZ15JnGq7h"
}
]
}
}
}
}
But I want to get country details inside this query results. Is there a way to do that?
I thought maybe something like this exists:
query JobQuery {
objects {
getJob(objectId: "sqvJTrN9no") {
title
company {
name
}
countries
}
findCountry(where: { objectId: { _in: ["lZ15JnGq7h"]} }) {
results {
name
}
}
}
}
Result:
{
"data": {
"objects": {
"getJob": {
"title": "Sales Assistant",
"company": {
"name": "Gulfstream Distribution"
},
"countries": [
{
"__type": "Pointer",
"className": "Country",
"objectId": "lZ15JnGq7h"
}
]
},
"findCountry": {
"results": [
{
"name": "Azerbaijan"
}
]
}
}
}
}