Workaround bug in server side
It took me SO LONG to figure out what the issue is...
This commit is contained in:
parent
badcec976a
commit
ce03cbcd2a
|
@ -36,7 +36,7 @@ fn main() {
|
||||||
|
|
||||||
if let Some(response) = run_query::<TournamentSets, _>(
|
if let Some(response) = run_query::<TournamentSets, _>(
|
||||||
TournamentSetsVars {
|
TournamentSetsVars {
|
||||||
last_query: None,
|
last_query: Timestamp(1),
|
||||||
game_id: VideogameId(1386),
|
game_id: VideogameId(1386),
|
||||||
country: None,
|
country: None,
|
||||||
state: Some("GA"),
|
state: Some("GA"),
|
||||||
|
|
|
@ -6,9 +6,12 @@ use schema::schema;
|
||||||
|
|
||||||
#[derive(cynic::QueryVariables, Debug)]
|
#[derive(cynic::QueryVariables, Debug)]
|
||||||
pub struct TournamentSetsVarsRaw<'a> {
|
pub struct TournamentSetsVarsRaw<'a> {
|
||||||
|
// HACK: This should really be an optional variable, but there seems to be a
|
||||||
|
// server-side bug that completely breaks everything when this isn't passed.
|
||||||
|
last_query: Timestamp,
|
||||||
|
|
||||||
country: Option<&'a str>,
|
country: Option<&'a str>,
|
||||||
game_id: ID,
|
game_id: ID,
|
||||||
last_query: Option<Timestamp>,
|
|
||||||
state: Option<&'a str>,
|
state: Option<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,9 +79,9 @@ struct Entrant {
|
||||||
// Unwrap
|
// Unwrap
|
||||||
|
|
||||||
pub struct TournamentSetsVars<'a> {
|
pub struct TournamentSetsVars<'a> {
|
||||||
pub country: Option<&'a str>,
|
pub last_query: Timestamp,
|
||||||
pub game_id: VideogameId,
|
pub game_id: VideogameId,
|
||||||
pub last_query: Option<Timestamp>,
|
pub country: Option<&'a str>,
|
||||||
pub state: Option<&'a str>,
|
pub state: Option<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,16 +102,16 @@ impl<'a> QueryUnwrap<TournamentSetsVarsRaw<'a>> for TournamentSets {
|
||||||
|
|
||||||
fn wrap_vars(
|
fn wrap_vars(
|
||||||
TournamentSetsVars {
|
TournamentSetsVars {
|
||||||
country,
|
|
||||||
game_id: VideogameId(game_id),
|
|
||||||
last_query,
|
last_query,
|
||||||
|
game_id: VideogameId(game_id),
|
||||||
|
country,
|
||||||
state,
|
state,
|
||||||
}: TournamentSetsVars,
|
}: TournamentSetsVars,
|
||||||
) -> TournamentSetsVarsRaw {
|
) -> TournamentSetsVarsRaw {
|
||||||
TournamentSetsVarsRaw {
|
TournamentSetsVarsRaw {
|
||||||
country,
|
|
||||||
game_id: ID(game_id),
|
|
||||||
last_query,
|
last_query,
|
||||||
|
game_id: ID(game_id),
|
||||||
|
country,
|
||||||
state,
|
state,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue