HackGT / checkin2

Simple and robust check in system for hackathons and other events. Integrates with HackGT/registration
https://checkin.hack.gt
MIT License
7 stars 1 forks source link

If warnOnDuplicates is null, GraphQL API breaks when checkin_success field requested #61

Closed evan10s closed 5 years ago

evan10s commented 5 years ago

When running a GraphQL query such as


mutation CheckIn {
  check_out(user: "user-id", tag:"hackgt") {
    tags {
      tag {
        name
      }
      checked_in
      checkin_success
      last_successful_checkin {
        checked_in
        checked_in_date
        checked_in_by
      }
    }
  }
}```

the error "Cannot return null for non-nullable field TagState.checkin_success." is returned by the API.  The cause of this appears to be an upgrade from an older version of checkin2 resulting in some tags not having a value defined for their `warnOnDuplicates` attribute, which as a result is just `null`.