From ae45e2b6cdb07c8913f274e3d0481da4b0996863 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 14 Aug 2024 20:44:08 -0400 Subject: [PATCH] chore: bump schema --- schema/startgg.graphql | 187 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 177 insertions(+), 10 deletions(-) diff --git a/schema/startgg.graphql b/schema/startgg.graphql index 8ab0177..1b3b959 100644 --- a/schema/startgg.graphql +++ b/schema/startgg.graphql @@ -207,6 +207,10 @@ enum StreamType { """ MIXER + """ + + """ + YOUTUBE } """ @@ -327,6 +331,14 @@ type Event { """ deckSubmissionDeadline: Timestamp """ + Maximum number of participants each Entrant can have + """ + entrantSizeMax: Int @deprecated(reason: "Migrate to teamRosterSize") + """ + Minimum number of participants each Entrant can have + """ + entrantSizeMin: Int @deprecated(reason: "Migrate to teamRosterSize") + """ The entrants that belong to an event, paginated by filter criteria """ entrants(query: EventEntrantPageQuery): EntrantConnection @@ -387,6 +399,10 @@ type Event { """ rulesetId: Int """ + Settings pulled from the event ruleset, if one exists + """ + rulesetSettings: JSON @deprecated(reason: "Use ruleset") + """ Paginated sets for this Event """ sets( @@ -523,6 +539,7 @@ type Entrant { Standing for this entrant given an event. All entrants queried must be in the same event (for now). """ standing: Standing + stream: Streams @deprecated(reason: "DEPRECATED. Use streams instead, which supports multiple stream types and teams.") streams: [Streams] """ Team linked to this entrant, if one exists @@ -713,6 +730,10 @@ type Set { """ phaseGroup: PhaseGroup """ + The sets that are affected from resetting this set + """ + resetAffectedData: ResetAffectedData + """ The round number of the set. Negative numbers are losers bracket """ round: Int @@ -756,6 +777,14 @@ A game represents a single game within a set. """ type Game { id: ID + """ + Score of entrant 1. For smash, this is equivalent to stocks remaining. + """ + entrant1Score: Int + """ + Score of entrant 2. For smash, this is equivalent to stocks remaining. + """ + entrant2Score: Int images(type: String): [Image] orderNum: Int """ @@ -786,6 +815,10 @@ type Image { A selection for this game. i.e. character/stage selection, etc """ type GameSelection { + """ + If this is a character selection, returns the selected character. + """ + character: Character id: ID """ The entrant who this selection is for @@ -801,6 +834,18 @@ type GameSelection { selectionValue: Int } +""" +A character in a videogame +""" +type Character { + id: ID + images(type: String): [Image] + """ + Name of Character + """ + name: String +} + """ A participant of a tournament; either a spectator or competitor """ @@ -913,6 +958,15 @@ type Player { """ rankings(limit: Int, videogameId: ID): [PlayerRank] """ + Recent sets for this player. + """ + recentSets( + """ + Use this to get H2H history between two players + """ + opponentId: ID + ): [Set] @deprecated(reason: "Use the sets field instead.") + """ Recent standings """ recentStandings( @@ -973,6 +1027,7 @@ type Standing { The player(s) tied to this standing's entity """ player: Player + standing: Int @deprecated(reason: "The \"placement\" field is identical and will eventually replace \"standing\"") stats: StandingStats totalPoints: Float } @@ -1243,6 +1298,10 @@ enum StreamSource { Stream is on a mixer.com channel """ MIXER + """ + Stream is on a youtube.com channel + """ + YOUTUBE } input TeamPaginationQuery { @@ -1356,6 +1415,8 @@ interface Team { Uniquely identifying token for team. Same as the hashed part of the slug """ discriminator: String + entrant: Entrant @deprecated(reason: "Use the entrant field off the EventTeam type") + event: Event @deprecated(reason: "Use the event field off the EventTeam type") images(type: String): [Image] members(status: [TeamMemberStatus]): [TeamMember] name: String @@ -1431,6 +1492,22 @@ type PhaseGroup { """ firstRoundTime: Timestamp numRounds: Int + paginatedSeeds(query: SeedPaginationQuery!, eventId: ID): SeedConnection @deprecated(reason: "Please use 'seeds', which is now paginated") + """ + Paginated sets on this phaseGroup + """ + paginatedSets( + page: Int + perPage: Int + """ + How to sort these sets + """ + sortType: SetSortType + """ + Supported filter options to filter down set results. + """ + filters: SetFilters + ): SetConnection @deprecated(reason: "Please use 'sets', which is now paginated") """ The phase associated with this phase group """ @@ -1612,6 +1689,7 @@ type Phase { The number of seeds this phase contains. """ numSeeds: Int + paginatedSeeds(query: SeedPaginationQuery!, eventId: ID): SeedConnection @deprecated(reason: "Please use 'seeds' instead") """ Phase groups under this phase, paginated """ @@ -1753,6 +1831,12 @@ type Stage { name: String } +type ResetAffectedData { + affectedSetCount: Int + affectedSets: [Set] + affectedPhaseGroupCount: Int +} + """ A slot in a set where a seed currently or will eventually exist in order to participate in the set. """ @@ -1810,6 +1894,10 @@ type League { """ events(query: LeagueEventsQuery): EventConnection """ + Hacked "progression" into this final event + """ + finalEventId: Int @deprecated(reason: "No longer used") + """ True if tournament has at least one offline event """ hasOfflineEvents: Boolean @@ -1828,6 +1916,10 @@ type League { The tournament name """ name: String + """ + Top X number of people in the standings who progress to final event + """ + numProgressingToFinalEvent: Int @deprecated(reason: "No longer used") numUniquePlayers: Int postalCode: String primaryContact: String @@ -1964,18 +2056,10 @@ type Videogame { images(type: String): [Image] name: String slug: String -} - -""" -A character in a videogame -""" -type Character { - id: ID - images(type: String): [Image] """ - Name of Character + All stages for this videogame """ - name: String + stages: [Stage] } input StandingPaginationQuery { @@ -2296,6 +2380,32 @@ type Mutation { """ deleteWave(waveId: ID!): Boolean """ + Generate tournament registration Token on behalf of user + """ + generateRegistrationToken(registration: TournamentRegistrationInput!, userId: ID!): String + """ + Update a set to called state + """ + markSetCalled(setId: ID!): Set + """ + Update a set to called state + """ + markSetInProgress(setId: ID!): Set + """ + Register for tournament + """ + registerForTournament(registration: TournamentRegistrationInput, registrationToken: String): Participant + """ + Report set winner or game stats for a H2H bracket set. If winnerId is + supplied, mark set as complete. gameData parameter will overwrite any existing + reported game data. + """ + reportBracketSet(setId: ID!, winnerId: ID, isDQ: Boolean, gameData: [BracketSetGameDataInput]): [Set] + """ + Resets set to initial state, can affect other sets and phase groups + """ + resetSet(setId: ID!, resetDependentSets: Boolean): Set + """ Automatically attempt to resolve all schedule conflicts. Returns a list of changed seeds """ resolveScheduleConflicts(tournamentId: ID!, options: ResolveConflictsOptions): [Seed] @@ -2304,6 +2414,11 @@ type Mutation { """ swapSeeds(phaseId: ID!, seed1Id: ID!, seed2Id: ID!): [Seed] """ + Update game stats for a H2H bracket set. Set winner cannot be changed with + this function, use the resetSet mutation instead. + """ + updateBracketSet(setId: ID!, winnerId: ID, isDQ: Boolean, gameData: [BracketSetGameDataInput]): Set + """ Update set of phase groups in a phase """ updatePhaseGroups(groupConfigs: [PhaseGroupUpdateInput]!): [PhaseGroup] @@ -2325,6 +2440,54 @@ type Mutation { upsertWave(waveId: ID, tournamentId: ID, fields: WaveUpsertInput!): Wave } +input TournamentRegistrationInput { + eventIds: [ID] +} + +""" +Game specific H2H set data such as character, stage, and stock info +""" +input BracketSetGameDataInput { + """ + Entrant ID of game winner + """ + winnerId: ID + """ + Game number + """ + gameNum: Int! + """ + Score for entrant 1 (if applicable). For smash, this is stocks remaining. + """ + entrant1Score: Int + """ + Score for entrant 2 (if applicable). For smash, this is stocks remaining. + """ + entrant2Score: Int + """ + ID of the stage that was played for this game (if applicable) + """ + stageId: ID + """ + List of selections for the game, typically character selections. + """ + selections: [BracketSetGameSelectionInput] +} + +""" +Game specific H2H selections made by the entrants, such as character info +""" +input BracketSetGameSelectionInput { + """ + Entrant ID that made selection + """ + entrantId: ID! + """ + Character selected by this entrant for this game. + """ + characterId: Int +} + input ResolveConflictsOptions { lockedSeeds: [ResolveConflictsLockedSeedConfig] } @@ -2426,6 +2589,8 @@ type EventTeam implements Team { Uniquely identifying token for team. Same as the hashed part of the slug """ discriminator: String + entrant: Entrant @deprecated(reason: "Use the entrant field off the EventTeam type") + event: Event @deprecated(reason: "Use the event field off the EventTeam type") globalTeam: GlobalTeam images(type: String): [Image] members(status: [TeamMemberStatus]): [TeamMember] @@ -2441,6 +2606,8 @@ type GlobalTeam implements Team { Uniquely identifying token for team. Same as the hashed part of the slug """ discriminator: String + entrant: Entrant @deprecated(reason: "Use the entrant field off the EventTeam type") + event: Event @deprecated(reason: "Use the event field off the EventTeam type") eventTeams(query: TeamPaginationQuery): EventTeamConnection images(type: String): [Image] """