Skip to content

Commit

Permalink
Locale is now in DFE - no need for reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
bbakerman committed Aug 24, 2023
1 parent e1bcdaa commit d04517c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/graphql/validation/locale/LocaleUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,13 @@ public static Locale determineLocale(DataFetchingEnvironment environment, Locale
//
Locale locale = environment.getLocale();
if (locale == null) {
locale = extractLocale(environment);
locale = extractLocale(environment.getContext());
if (locale == null) {
locale = extractLocale(environment.getContext());
locale = extractLocale(environment.getSource());
if (locale == null) {
locale = extractLocale(environment.getSource());
locale = extractLocale(environment.getRoot());
if (locale == null) {
locale = extractLocale(environment.getRoot());
if (locale == null) {
locale = defaultLocale;
}
locale = defaultLocale;
}
}
}
Expand Down

0 comments on commit d04517c

Please sign in to comment.