Hi,
I’m making an app for an API that uses GraphQL. One of the modules has a body that looks something like this:
"body": {
"query": "query getInvoiceList($input: ListInfoInput!) { getInvoiceList(input: $input) { invoices { client invoiceId invoiceDate statusEnum } } }",
"variables": {
"input": {
"pageSize": 100,
"condition": {
"joinOperator": "AND",
"operands": [
{
"attribute": "statusEnum",
"operator": "is",
"value": "DRAFT"
},
{
"attribute": "client.accountId",
"operator": "is",
"value": "{{parameters.customerID}}"
}
]
}
}
}
},
So far so good, but I would like for the customerID
parameter to be optional, and I cannot pass null
for a value there. Instead I need to omit the whole object.
{
"attribute": "client.accountId",
"operator": "is",
"value": "{{parameters.customerID}}"
}
Any way to achieve this?