List Dashboards

Retrieve a paginated list of dashboards that you have access to view or modify


List Dashboards

Retrieve dashboards that you have access to view. This includes dashboards you created and dashboards that have been shared with you.

Basic Example

query ListDashboards {
  dashboards(filter: { companyId: "company_123" }) {
    items {
      id
      title
      createdBy {
        id
        name
        email
      }
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Advanced Example

query ListDashboardsAdvanced {
  dashboards(
    filter: { 
      companyId: "company_123"
      projectId: "proj_456"  # Optional: filter by project
    }
    sort: [updatedAt_DESC, title_ASC]
    skip: 0
    take: 10
  ) {
    items {
      id
      title
      createdBy {
        id
        name
        email
      }
      dashboardUsers {
        id
        role
        user {
          id
          name
          email
        }
      }
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Input Parameters

DashboardFilterInput

ParameterTypeRequiredDescription
companyIdString!✅ YesOrganization ID to filter dashboards
projectIdStringNoOptional project ID to filter dashboards

Sorting Options

Sort ValueDescription
title_ASCSort by title ascending
title_DESCSort by title descending
createdBy_ASCSort by creator ascending
createdBy_DESCSort by creator descending
updatedAt_ASCSort by update time ascending
updatedAt_DESCSort by update time descending (default)

Pagination Parameters

ParameterTypeDefaultDescription
skipInt0Number of items to skip
takeInt20Number of items to return (max 100)

Response Fields

DashboardPagination

FieldTypeDescription
items[Dashboard!]!Array of dashboard objects
pageInfoPageInfo!Pagination information

Dashboard

FieldTypeDescription
idID!Unique identifier for the dashboard
titleString!Display name of the dashboard
createdByUser!User who created the dashboard
dashboardUsers[DashboardUser!]Users with access to this dashboard
createdAtDateTime!When the dashboard was created
updatedAtDateTime!When the dashboard was last modified

DashboardUser

FieldTypeDescription
idID!Unique identifier for the dashboard user
roleDashboardRole!User’s role (VIEWER or EDITOR)
userUser!User information

Access Control

Dashboard Visibility

You can only see dashboards where you are:

  • The creator of the dashboard
  • Explicitly granted access via dashboard sharing

Required Permissions

  • Authentication Required: You must be logged in
  • Organization Access: You must have access to the specified organization
  • Project Access: If filtering by project, you must have access to that project

Error Responses

Organization Not Found

{
  "errors": [{
    "message": "Organization not found",
    "extensions": {
      "code": "COMPANY_NOT_FOUND"
    }
  }]
}

Project Not Found

{
  "errors": [{
    "message": "Project not found", 
    "extensions": {
      "code": "PROJECT_NOT_FOUND"
    }
  }]
}

Common Use Cases

List All Organization Dashboards

query CompanyDashboards {
  dashboards(filter: { companyId: "company_123" }) {
    items {
      id
      title
      createdBy { name }
    }
  }
}

List Project-Specific Dashboards

query ProjectDashboards {
  dashboards(filter: { 
    companyId: "company_123"
    projectId: "proj_456"
  }) {
    items {
      id
      title
    }
  }
}

Paginated Dashboard List

query PaginatedDashboards {
  dashboards(
    filter: { companyId: "company_123" }
    skip: 20
    take: 10
  ) {
    items {
      id
      title
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
  }
}

Best Practices

Performance

  • Use pagination for better performance with large dashboard lists
  • Only request fields you need in your application
  • Consider caching dashboard lists for frequently accessed data

Filtering

  • Always filter by organization to ensure proper data isolation
  • Use project filtering when working with project-specific dashboards
  • Combine filters to narrow down results efficiently

Sorting

  • Default sorting is by updatedAt_DESC (most recently updated first)
  • Use title sorting for alphabetical organization
  • Combine multiple sort criteria for complex ordering needs