Stylianos Gakis
02/23/2022, 10:32 AMLocale
specified as a type with the specific string values that our backend accepts in the schema, and I want to use that in my local code in order to make sure I am not sending in a wrong string.
The queries themselves accept a String type, but I can use that type
enum Locale {
sv_SE
en_SE
... # more here
}
to use it typed in my code, and then extract the rawValue at the last moment to pass it to the query.
But the thing is, if none of the .graphql
files mention this type, it’s not generated automatically.mbonnin
02/23/2022, 10:32 AMalwaysGenerateTypesMatching
Gradle optionapollo {
alwaysGenerateTypesMatching.set(listOf("Locale"))
}
Stylianos Gakis
02/23/2022, 10:33 AMmbonnin
02/23/2022, 10:35 AM