Skip to content

Commit 86a2075

Browse files
committed
Update readme to describe the fork and add gradle task for Nosto internal publishing
1 parent 66fc6c1 commit 86a2075

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Nosto Fork of GraphQL-Java Annotations adds support for partial updates and publishToNostoRepo gradle task for internal use
2+
3+
Adds support for binding to `java.util.Optional` parameters. Binding to Optional parameters allows implementing partial updates. With a partial update the mutate call can update only some of the Optional fields without needing to repeat all the existing values of an object.
4+
5+
The mapping from an optional field in GraphQL schema that binds to `java.util.Optional` is the following:
6+
1. value given to the field in GraphQL call is mapped into `java.util.Optional` of the underlying type
7+
2. null given to the field in GraphQL call is mapped into `Optional.empty` to signal the removal of a possibly existing value of the field
8+
3. field not included in the GraphQL call is mapped into null to signal `undefined` so any possibly existing value(s) should not be modified
9+
10+
## Internal publishing to Nosto repository
11+
12+
Update the version in the `gradle.properties` file and run `./gradlew publishToNostoRepo` to publish the library to the Nosto repository.
13+
14+
115
![logo](graphql-annotations.png?raw=true)
216
# GraphQL-Java Annotations
317
![build](https://github.com/Enigmatis/graphql-java-annotations/actions/workflows/build.yml/badge.svg)

build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ apply plugin: 'biz.aQute.bnd.builder'
2424
apply plugin: 'maven-publish'
2525

2626

27+
28+
compileJava {
29+
options.release = 11
30+
}
31+
compileTestJava {
32+
options.release = 11
33+
}
34+
2735
// custom tasks for creating source/javadoc jars
2836
tasks.register('sourcesJar', Jar) {
2937
dependsOn classes
@@ -143,6 +151,20 @@ publishing {
143151
}
144152
}
145153
}
154+
155+
repositories {
156+
maven {
157+
url 'https://repo.nos.to/content/repositories/NostoDependencies/'
158+
credentials {
159+
username = "$mavenUser"
160+
password = "$mavenPassword"
161+
}
162+
}
163+
}
164+
}
165+
166+
tasks.register('publishToNostoRepo') {
167+
dependsOn 'publishMavenPublicationToMavenRepository'
146168
}
147169

148170
afterReleaseBuild.dependsOn nexusPublishing
@@ -158,6 +180,7 @@ nexusPublishing {
158180

159181
// to publish to local maven repo skip signing: ./gradlew publishToMavenLocal -x signGraphqlJavaPublication
160182
signing {
183+
required = { !version.endsWith("nosto") }
161184
def signingKey = System.getenv("MAVEN_CENTRAL_PGP_KEY")
162185
useInMemoryPgpKeys(signingKey, "")
163186
sign publishing.publications

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ org.gradle.daemon=true
55
org.gradle.parallel=true
66
org.gradle.jvmargs=-Dfile.encoding=UTF-8
77

8-
version = 21.5
8+
version = 21.5-nosto

0 commit comments

Comments
 (0)