What are objects?
Some fields, instead of a special graphql type, return objects. These objects don't always return the same amount of fields, without needing sub-queries.
Format
To call an object, you can just call it like a regular field:
query{
CreditNotes{
edges{
node{
tax_type
}
}
}
}
However, the results will look somewhat like this:
{
"data": {
"CreditNotes": {
"edges": {
"node": [
{
"tax_type": {
"id": "tax_inclusive",
"label": "Tax inclusive"
}
}
]
}
}
}
}
The object field is generally a structure, with keys and results. The structure itself depends on each individual field.