Skip to content

catalinmiron/uzual-mobile

Repository files navigation

Would you like to support me?

Buy Me A Coffee

UZUAL

Feed your brains with habits for a better mood

Light Theme

Dark Theme

mutation createUser {
  signup(
    email: "[email protected]"
    name: "Catalin Miron"
    password: "password"
  ) {
    token
  }
}

mutation signin {
  login(email: "[email protected]", password: "password") {
    token
  }
}

# mutation addHabit{
#   addHabit(title:"1 Coffee / day", description:"Just one coffee and see how it feels"){
#     id
#   }
# }

# mutation addDailyHabit{
#   addDailyHabit(habitId:"cjutuwgbu000t0765vjdje6n5", done: true, date: "2019-04-09"){
#     id
#   }
# }

query me {
  me {
    name
    email
    pushToken
    id
    isPro
  }

  moods(first: 5, orderBy: date_DESC) {
    id
    type
    date
  }
  habits(first: 5) {
    title
    description
    starred
    habits(first: 5, orderBy: date_DESC) {
      id
      date
      done
    }
  }
}

query getHabits {
  habits {
    id
    title
    description
    habits {
      id
      done
      date
    }
  }
}

query myMoods {
  moods(
    where: { date_gte: "2019-03-01", date_lte: "2019-03-30" }
    orderBy: date_ASC
  ) {
    id
    type
    date
  }
}

mutation setMood {
  setMood(date: "2019-04-23", type: Frown) {
    id
  }
}

mutation setDailyHabit {
  setDailyHabit(
    id: "cjuxtixuk0066073847pvhos9"
    done: false
    date: "2019-04-01"
  ) {
    done
  }
}

//For changing the date for the current month + refreshing

this.props.data.stopPolling();
await this.props.data.refetch({
  start,
  end
});
this.props.data.startPolling(5000);

Assets + Copyrights for them


Icons made by Skyclick from www.flaticon.com is licensed by CC 3.0 BY