2023-11-02 15:16:35 -04:00
|
|
|
use schema::schema;
|
|
|
|
|
|
|
|
// Types
|
|
|
|
|
|
|
|
// HACK: Unfortunately, start.gg seems to use integers for its ID type, whereas
|
|
|
|
// cynic always assumes that IDs are strings. To get around that, we define new
|
|
|
|
// scalar types that deserialize to u64.
|
|
|
|
|
|
|
|
#[derive(cynic::Scalar, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
#[cynic(graphql_type = "ID")]
|
2023-11-03 18:11:39 -04:00
|
|
|
#[repr(transparent)]
|
2023-11-02 15:16:35 -04:00
|
|
|
pub struct VideogameId(pub u64);
|
|
|
|
|
|
|
|
#[derive(cynic::Scalar, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
#[cynic(graphql_type = "ID")]
|
2023-11-03 18:11:39 -04:00
|
|
|
#[repr(transparent)]
|
2023-11-02 15:16:35 -04:00
|
|
|
pub struct EventId(pub u64);
|
|
|
|
|
|
|
|
#[derive(cynic::Scalar, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
#[cynic(graphql_type = "ID")]
|
2023-11-03 18:11:39 -04:00
|
|
|
#[repr(transparent)]
|
2023-11-02 15:16:35 -04:00
|
|
|
pub struct EntrantId(pub u64);
|
|
|
|
|
|
|
|
#[derive(cynic::Scalar, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
#[cynic(graphql_type = "ID")]
|
2023-11-03 18:11:39 -04:00
|
|
|
#[repr(transparent)]
|
2023-11-02 15:16:35 -04:00
|
|
|
pub struct PlayerId(pub u64);
|
|
|
|
|
|
|
|
#[derive(cynic::Scalar, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
#[cynic(graphql_type = "ID")]
|
2023-11-03 18:11:39 -04:00
|
|
|
#[repr(transparent)]
|
2023-11-02 15:16:35 -04:00
|
|
|
pub struct SetId(pub u64);
|
|
|
|
|
|
|
|
#[derive(cynic::Scalar, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
2023-11-03 18:11:39 -04:00
|
|
|
#[repr(transparent)]
|
2023-11-02 15:16:35 -04:00
|
|
|
pub struct Timestamp(pub u64);
|