Package graphql.validation.locale
Class LocaleUtil
- java.lang.Object
-
- graphql.validation.locale.LocaleUtil
-
public class LocaleUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description LocaleUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclearMethodCaches()static java.util.LocaledetermineLocale(graphql.schema.DataFetchingEnvironment environment, java.util.Locale defaultLocale)This will try to determine the Locale from the data fetching env in a number of ways, searching via the context and source objects and the data fetching environment itself.
-
-
-
Method Detail
-
determineLocale
public static java.util.Locale determineLocale(graphql.schema.DataFetchingEnvironment environment, java.util.Locale defaultLocale)This will try to determine the Locale from the data fetching env in a number of ways, searching via the context and source objects and the data fetching environment itself. This plugs a gap while graphql-java does not have a getLocale on ExecutionInput / DataFetchingEnvironment- Parameters:
environment- the fetching envdefaultLocale- the default to use- Returns:
- a Locale
-
clearMethodCaches
public static void clearMethodCaches()
-
-