/caliban-akka-persistence

Sample project using caliban and akka-persistence

Primary LanguageScala

CAP - Caliban Akka Persistence

Just a small sample project to integrate and play around with:

GraphQL Api Usage

Increment / Decrement the counter:

mutation {
  increment(n: 5) {
      count
  } 
}
mutation {
  decrement(n: 5) {
      count
  }
}

Querying the counter:

{
  count {
    count
    lastUpdateTimestamp
    description
  }
}

Setting a description on the counter:

mutation {
  setDescription(description: "I'm overwriting the description ignoring the current count") {
    count
    description
  }
}
mutation {
  setDescription(ifCountMatching: 10, description: "I'm only overwriting the description if the current count is 10") {
    count
    description
  }
}