Skip to main content

Queries

The list of entities can be retrieved from the database by using find query which is defined for every database for each space. For example findBugs, findEmployees.
Find more information about GraphQL queries here.
g-find-list-64bc75cd.gif

List of entities

Use findXXX without arguments to retrieve all records, but note that there is a limit of 100 by default, so use offset and limit to retrieve data page by page if it is required.
Use Docs → Query section to explore possible fields selection. Screenshot 2024-01-12 at 10.04.00 AM.png Curl:
JavaScript:
Output

Filtering

There is a variety of filtering capabilities for each database including filtering by one-to-one fields or inner lists content. Filters can be applied by providing filtering arguments for find queries. The filter operators available can be discovered through autocomplete while creating a query in GraphiQL. g-filters-000097e3.gif Filtering by native fields
Filtering by one-to-one fields Find Open and Done bugs, for example:
Find High priority bugs:
Filtering by many fields (AND statement is used)
String filtering operators
Int filtering operators
Float filtering operators
Boolean filtering operators
ID filtering operators

Filtering by inner lists

The database can be filtered by content of inner list, but it is a bit different from filtering by one-to-one or native fields. For example the query to the left allows to find releases which contains bugs in “Open” state or with effort greater than 0. The following operators can be used for filtering database by inner list:
Filtering by inner lists:

Filtering inner lists

The inner list of database can be filtered in the same way the database filtered. For example if you want to show only “To Do” bugs for releases: Sample of filtering inner list

Sorting

The database or content of inner lists of the database can be sorted using orderBy argument which can be applied for native fields or one-to-one properties.

Rich fields and comments

You can download content of rich text fields or comments in four formats: jsonString, text, md, html.
Output

File fields

You can query for public file url which will be valid for 60 minutes using url
Output

Paging and limits

By default, find database query returns 100 records. The default can be changed by setting limit argument. Use offset argument to retrieve next page if the current page contains 100 records (or equals to limit value). Retrieve first page (limit is 3)
Retrieve second page (limit: 3, offset: 3). Retrieve only if first page size equals to 3

Aliases

GraphQL aliases can be used for find query if you would like to get separated results or as alternative to OR statement. Using aliases:
Output: