Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update graphql-java to 19.2 #76

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ This library provides extended validation of fields and field arguments for [gra
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java-extended-validation</artifactId>
<version>18.1</version>
<version>19.0</version>
</dependency>
```

```groovy
compile 'com.graphql-java:graphql-java-extended-validation:18.1'
compile 'com.graphql-java:graphql-java-extended-validation:19.0'
```

> Note:
Expand All @@ -38,6 +38,8 @@ compile 'com.graphql-java:graphql-java-extended-validation:18.1'
> use 18.1 or above for graphql-java 18.x and above
>
> use 18.1-hibernate-validator-6.2.0.Final for graphql-java 18.x and SpringBoot 2.x support
>
> use 19.0 or above for graphql-java 19.x and above

It's currently available from Maven central.

Expand Down Expand Up @@ -134,14 +136,13 @@ Like javax.validation, this library ships with some default error message templa
# I18n Locale Support

The validation library aims to offer Internationalisation (18N) of the error messages. When the validation rules
run they are passed in a `java.util.Locale`. A `ResourceBundleMessageInterpolator` can then be used to build up messages
run they are passed in a `java.util.Locale`. A `ResourceBundleMessageInterpolator` can then be used to build up messages
that come from I18N bundles.

A `Locale` should be created per graphql execution. However at the time of writing graphql-java does not
pass in a `Locale` per request `ExecutionInput` . A PR exists to fix this and it will be released in v14.0. This
library will then be updated to to take advantage of this.
A `Locale` should be created per graphql execution, and can be passed to `ExecutionInput`. More i18n is being added to graphql-java
and later this library will then be updated to to take advantage of i18n.

In the mean time you can work around this by having the `context`, `source` or `root` implement `graphql.validation.locale.LocaleProvider` and
In the meantime you can work around this by having the `context`, `source` or `root` implement `graphql.validation.locale.LocaleProvider` and
the library will extract a `Locale` from that.

# Schema Directive Wiring
Expand Down
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ version = releaseVersion ? releaseVersion : getDevelopmentVersion()
println "Building version = " + version
group = 'com.graphql-java'

if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
def msg = String.format("This build must be run with java 1.8 - you are running %s - gradle finds the JDK via JAVA_HOME=%s",
JavaVersion.current(), System.getenv("JAVA_HOME"))
throw new GradleException(msg)
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand All @@ -39,8 +45,8 @@ repositories {


dependencies {
api "com.graphql-java:graphql-java:18.1"
api "com.graphql-java:graphql-java-extended-scalars:18.1"
api "com.graphql-java:graphql-java:19.2"
api "com.graphql-java:graphql-java-extended-scalars:19.0"
api "org.hibernate.validator:hibernate-validator:7.0.1.Final"
api "org.glassfish:jakarta.el:4.0.0"

Expand Down