Skip to content

Latest commit

 

History

History
43 lines (36 loc) · 559 Bytes

streaks.md

File metadata and controls

43 lines (36 loc) · 559 Bytes

Status Update Streaks

Overview

Track members' daily status update streaks and records.

Models

StatusUpdateStreak

struct StatusUpdateStreak {
    member_id: i32,
    current_streak: i32,
    max_streak: i32,
}

Queries

Get Streak

query {
    getUpdateStreak(memberId: 1) {
        currentStreak
        maxStreak
    }
}

Mutations

Increment Streak

mutation {
    incrementStreak(
        input: {
            memberId: 1
        }
    ) {
        currentStreak
        maxStreak
    }
}