Queries
Queries are for reading data. We typically support filtering, sorting, pagination and aggregation where we return lists of data.
We will not change any entities from a query.
- Using fragments is recommended
- For more responsive queries we recommend requesting only the necessary data as we will only read the requested data from the database.
- For better performance always use variables instead of adding parameters directly in the query body
Schema
The Dimensions and Financials APIs are versatile, accommodating a variety of query types. Depending on the specific requirements of the use case, different segments of the API schema can retrieve varying degrees of data from the database.
Here are some of the most frequently utilised query categories within our API:
Lists
This is where we keep smaller versions of master record entities which are optimised for faster reads and expose a smaller amount of data
Examples of List queries include:
- Customer/Supplier Record Summaries
- Price Records
- BACS Formats
- Currency Rates
We recommend using a list wherever possible as they are less complicated than their master record
equivalents
query ($filter: CustomerSummaryFilterInput) {
debtors {
lists {
customers(filter: $filter) {
items {
primaryKey
code
name
country
currencyCode
currencySymbol
dateEdited
}
}
}
}
}