Skip to main content

Common Queries

Who this is for

Developers and analysts using the Owlie GraphQL API.

Goal

Copy, adapt, and run common GraphQL queries for everyday tasks.

Prereqs

  • An API key
  • /api/authentication

Success criteria

You can query identities, requests, and tickets with pagination.

Pagination pattern

Use connection fields with cursors for large datasets. Example:

query Identities($first: Int!, $after: String) {
identities(first: $first, after: $after) {
data {
id
display_name
email
status
}
pageInfo {
endCursor
hasNextPage
}
}
}

Query: list identities

query ListIdentities {
identities(first: 25) {
data {
id
display_name
email
department
status
}
pageInfo {
endCursor
hasNextPage
}
}
}

Query: list requests

query ListRequests {
requests(first: 25) {
data {
id
request_number
status
requester {
id
display_name
}
beneficiary {
id
display_name
}
created_at
}
pageInfo {
endCursor
hasNextPage
}
}
}

Query: list tickets

query ListTickets {
myTickets(first: 25) {
data {
id
status
type
created_at
request {
id
request_number
}
}
pageInfo {
endCursor
hasNextPage
}
}
}

Default configuration

  • Start with small page sizes and paginate.

When to change it

  • Increase page size only if your API client can handle large responses.

Impact and risks

  • Large queries can be slow and harder to troubleshoot.

Example

Sample response fragment from ListIdentities:

{
"data": {
"identities": {
"data": [
{
"id": "id_123",
"display_name": "Avery Kim",
"email": "avery@example.com",
"department": "Engineering",
"status": "ACTIVE"
}
],
"pageInfo": {
"endCursor": "cursor_abc",
"hasNextPage": false
}
}
}
}

Troubleshooting

  • If results are empty, confirm you are querying the correct tenant.
  • If pagination stops early, verify cursors and page size.

Assumptions & Questions

  • Confirm whether myTickets is intended for both EUD and Admin contexts.

Next steps

  • /api/graphql-schema
  • /reference/errors