Skip to content

Commit

Permalink
chore: update gql stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
castdrian committed Jun 22, 2024
1 parent 3c93f86 commit 4bd59a7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CoreDex/GraphQL/getPokemonByDexNumber.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ query GetPokemonByDexNumber($number: Int!) {
}
height
num
ipa
preevolutions {
species
}
Expand Down
8 changes: 8 additions & 0 deletions CoreDex/GraphQL/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,14 @@ type Pokemon {
"""The classification of a Pokémon as listed in the Pokedex"""
classification: String

"""The respelling of the name of the Pokémon"""
respelling: String

"""
The International Phonetic Alphabet (IPA) representation of the name of the Pokémon
"""
ipa: String

"""The colour of a Pokémon as listed in the Pokedex"""
color: String!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class GetPokemonByDexNumberQuery: GraphQLQuery {
public static let operationName: String = "GetPokemonByDexNumber"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
definition: .init(
#"query GetPokemonByDexNumber($number: Int!) { getPokemonByDexNumber(number: $number) { __typename abilities { __typename first { __typename name shortDesc desc serebiiPage smogonPage } second { __typename name shortDesc desc serebiiPage smogonPage } hidden { __typename name shortDesc desc serebiiPage smogonPage } } backSprite baseStats { __typename attack defense hp specialattack specialdefense speed } baseStatsTotal catchRate { __typename base percentageWithOrdinaryPokeballAtFullHealth } color classification eggGroups evYields { __typename attack defense hp specialattack specialdefense speed } evolutionLevel flavorTexts { __typename flavor game } gender { __typename female male } height num preevolutions { __typename species } serebiiPage shinyBackSprite shinySprite smogonPage smogonTier species sprite types { __typename name } weight } }"#
#"query GetPokemonByDexNumber($number: Int!) { getPokemonByDexNumber(number: $number) { __typename abilities { __typename first { __typename name shortDesc desc serebiiPage smogonPage } second { __typename name shortDesc desc serebiiPage smogonPage } hidden { __typename name shortDesc desc serebiiPage smogonPage } } backSprite baseStats { __typename attack defense hp specialattack specialdefense speed } baseStatsTotal catchRate { __typename base percentageWithOrdinaryPokeballAtFullHealth } color classification eggGroups evYields { __typename attack defense hp specialattack specialdefense speed } evolutionLevel flavorTexts { __typename flavor game } gender { __typename female male } height num ipa preevolutions { __typename species } serebiiPage shinyBackSprite shinySprite smogonPage smogonTier species sprite types { __typename name } weight } }"#
))

public var number: Int
Expand Down Expand Up @@ -58,6 +58,7 @@ public class GetPokemonByDexNumberQuery: GraphQLQuery {
.field("gender", Gender.self),
.field("height", Double.self),
.field("num", Int.self),
.field("ipa", String?.self),
.field("preevolutions", [Preevolution]?.self),
.field("serebiiPage", String.self),
.field("shinyBackSprite", String.self),
Expand Down Expand Up @@ -98,6 +99,8 @@ public class GetPokemonByDexNumberQuery: GraphQLQuery {
public var height: Double { __data["height"] }
/// The dex number for a Pokémon
public var num: Int { __data["num"] }
/// The International Phonetic Alphabet (IPA) representation of the name of the Pokémon
public var ipa: String? { __data["ipa"] }
/// The preevolutions for a Pokémon, if any
public var preevolutions: [Preevolution]? { __data["preevolutions"] }
/// Serebii page for a Pokémon
Expand Down

0 comments on commit 4bd59a7

Please sign in to comment.