Skip to content

goalHistoriesCount

All completed goals for a given set of users

Arguments

category · String · Filter by goal repeat category (e.g. Daily, Weekly, Once).
include_subgoals · Boolean · When true, include histories from subgoals; when false, only parent goals are counted.
offset · Int · Pagination offset. Retained for backwards compatibility; does not affect the returned count.
unique · Boolean · When true, returns the count of distinct goals with at least one completion. When false, returns the raw history row count.
user_id · ID · User whose goal histories are counted. Defaults to the current user when omitted or inaccessible.

Returns

Int

Example

query goalHistoriesCount(
$category: String
$include_subgoals: Boolean
$offset: Int
$unique: Boolean
$user_id: ID
) {
goalHistoriesCount(
category: $category
include_subgoals: $include_subgoals
offset: $offset
unique: $unique
user_id: $user_id
)
}