Conditions & Filters

In previous examples, you will have noticed the use of the condition keyword at various points in the query, which provides a rudimentary means to filter for specific values. The Vertalo API also supports the filter keyword, which provides even more advanced capabilities.

Request:

query {
  allAccounts (condition: {type: "investor", email: "bob.smith@example.com"}) {
    nodes {
      id
      name
      email
      distributionsByInvestorId {
        nodes {
          amount
          allocationByAllocationId {
            name
            roundByRoundId {
              name
              assetByAssetId {
                name
              }
            }
          }
        }
      }
    }
  }
}
Response:

{
  "data": {
    "allAccounts": {
      "nodes": [
        {
          "id": "d6fb328d-2426-4689-98d0-8a0a03679a03",
          "name": "Bob Smith",
          "email": "bob.smith@example.com",
          "distributionsByInvestorId": {
            "nodes": [
              {
                "amount": "100000.000000000000000000",
                "allocationByAllocationId": {
                  "name": "Domestic Investors",
                  "roundByRoundId": {
                    "name": "Series A",
                    "assetByAssetId": {
                      "name": "Example Asset #1"
                    }
                  }
                }
              }
            ]
          }
        }
      ]
    }
  }
}

Filters allow for more complex comparisons, and support the use of operators such as:

  • greaterThan

  • lessThan

  • equalTo

  • notEqualTo

  • isNull

…plus many other capabilities.

Please refer to the documentation found in Vertalo’s GraphiQL API explorer for details on how to make use of conditions and filters.

What's on this Page