These queries are used to get assets based on nested object fields and also specify the fields that need to be retrieved in nested objects.
query {
car{
Id
make
color
engine{
id
model
}
}
}
{
"data": {
"car_count": 1,
"car": [
{
"Id": "car1",
"color": "red",
"engine": {
"id": 9001,
"model": "petrol"
},
"make": "ford"
}
]
}
}
query {
car{
Id
make
color
engine (lotId: 123) {
id
lotId
model
}
}
}
{
"data": {
"car_count": 1,
"car": [
{
"Id": "car1",
"color": "red",
"engine": {
"id": 9001,
"lotId": 123,
"model": "petrol"
},
"make": "ford"
}
]
}
}
Multiple nested conditions
Multiple conditions can be specified at different levels. In case of multiple conditions, they are combined using the "and" operator
query {
car (color: "red", make: "ford") {
Id
make
color
engine (lotId: 123) {
id
model
lotId
}
{
"data": {
"car_count": 1,
"car": [
{
"Id": "car1",
"color": "red",
"engine": {
"id": 9001,
"lotId": 123,
"model": "petrol"
},
"make": "ford"
}
]
}
}