StreamStat

StreamStat is used to represent the views of a particular stream. It provides information on the number of viewers that began or stopped watching and also the number of active viewers. It is also aggregated via the stat period. These stat periods are five minute intervals.

FieldDescription
accountIdThe account ID of the user that owns the stream
streamIdA unique identifier of the stream
fromThe start date of the stat period
toThe end date of the stat period
activeThe number of active viewers at the end of the stat period
numStartedThe number of viewers that began watching in the stat period
numEndedThe number of viewers that stopped watching in the stat period

Example

An example of how a query with this model can be made, viewing streamStats with pagination.

{
    streamStatPagination( page: 1, perPage: 10) {
        count,
        items {
            accountId
            from
            to
            active
            numStarted
            numEnded
            streamId
        }
        pageInfo {
            currentPage
            perPage
            pageCount
            itemCount
            hasNextPage
            hasPreviousPage
        }
    }
}