Skip to content

Commit 5485c54

Browse files
committed
Merge branch 'master' into RBT-928-pass-through-jakarta-annotations-try-2
# Conflicts: # graphql-builder/src/main/java/com/phocassoftware/graphql/builder/DirectivesSchema.java # graphql-builder/src/main/java/com/phocassoftware/graphql/builder/MethodProcessor.java # graphql-builder/src/test/java/com/phocassoftware/graphql/builder/JakartaValidationDirectiveTest.java # graphql-builder/src/test/java/com/phocassoftware/graphql/builder/type/directive/Cat.java # pom.xml
2 parents c340d5a + 01294a8 commit 5485c54

File tree

232 files changed

+13711
-1184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+13711
-1184
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
name: Release
22
permissions:
3-
contents: write
4-
packages: write
5-
on:
6-
workflow_dispatch:
7-
inputs:
8-
releaseType:
9-
type: choice
10-
description: "Release type"
11-
required: true
12-
default: minor
13-
options:
14-
- patch
15-
- minor
16-
- major
3+
contents: write
4+
on: workflow_dispatch
175
jobs:
186
release:
197
runs-on: ubuntu-latest
@@ -35,56 +23,21 @@ jobs:
3523
with:
3624
servers: >
3725
[
38-
{ "id": "sonatype", "username": "${{ secrets.MVN_REPO_PRIVATE_REPO_USER }}", "password": "${{ secrets.MVN_REPO_PRIVATE_REPO_PASSWORD }}" }
26+
{ "id": "central", "username": "${{ secrets.MAVEN_CENTRAL_TOKEN_USER }}", "password": "${{ secrets.MAVEN_CENTRAL_TOKEN_PASS }}" }
3927
]
40-
- name: set name
41-
run: |
42-
git config --global user.name "release-bot";
43-
git config --global user.email "[email protected]";
28+
29+
- run: git config --global user.name phocasadmin; git config --global user.email [email protected]
4430

4531
- name: add key
4632
run: |
47-
echo "${{ secrets.GPG_KEY }}" | base64 -d > private.key
33+
echo "${{ secrets.MAVEN_PRIVATE_KEY }}" | base64 -d > private.key
4834
gpg --batch --import ./private.key
4935
rm ./private.key
5036
gpg --list-secret-keys --keyid-format LONG
5137
52-
- name: Get current development version
53-
id: get_version
54-
run: |
55-
VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//' )
56-
echo "version=$VERSION" >> $GITHUB_OUTPUT
57-
58-
- name: Generate versions
59-
id: generate_versions
60-
uses: WyriHaximus/[email protected]
61-
with:
62-
version: ${{ steps.get_version.outputs.version }}
63-
64-
- name: Pick release version
65-
id: pick_release_version
66-
run: |
67-
VERSION=$(
68-
case ${{ github.event.inputs.releaseType }} in
69-
("minor") echo "${{ steps.generate_versions.outputs.minor }}" ;;
70-
("major") echo "${{ steps.generate_versions.outputs.major }}" ;;
71-
("patch") echo "${{ steps.generate_versions.outputs.patch }}" ;;
72-
esac
73-
)
74-
echo "version=$VERSION" >> $GITHUB_OUTPUT
75-
76-
7738
- name: prepare
7839
run: |
79-
mvn release:prepare -Dusername=${{ secrets.GITHUB_TOKEN }} \
80-
-DreleaseVersion=${{ steps.pick_release_version.outputs.version }} \
81-
-DdevelopmentVersion=${{ steps.pick_release_version.outputs.version }}-SNAPSHOT \
82-
-P sonatype
83-
40+
mvn release:prepare -Dusername=${{ secrets.GITHUB_TOKEN }} -P sonatype -DscmForceUpdate=true
8441
- name: release
8542
run: |
86-
mvn release:perform -Dusername=${{ secrets.GITHUB_TOKEN }} \
87-
-DreleaseVersion=${{ steps.pick_release_version.outputs.version }} \
88-
-DdevelopmentVersion=${{ steps.pick_release_version.outputs.version }}-SNAPSHOT \
89-
-Darguments="-DskipTests" \
90-
-P sonatype
43+
mvn release:perform -Dusername=${{ secrets.GITHUB_TOKEN }} -P sonatype -DscmForceUpdate=true

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,13 @@ jobs:
1818
with:
1919
java-version: 21
2020
distribution: zulu
21+
- name: Formatter Check
22+
run: mvn formatter:validate
23+
- name: License Check
24+
run: mvn license:check
2125
- name: Build with Maven
2226
run: mvn -B test --file pom.xml
27+
- uses: ashley-taylor/junit-report-annotations-action@master
28+
if: always()
29+
with:
30+
access-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
/target/
2-
/.classpath
3-
/.project
1+
.classpath
2+
.project
43
.settings
5-
.idea/*
6-
4+
target
5+
native-libs
6+
.idea
7+
*.iml
8+
bin

formatter.xml

Lines changed: 417 additions & 0 deletions
Large diffs are not rendered by default.

graphql-builder/pom.xml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<!--
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
4+
in compliance with the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License
9+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
10+
or implied. See the License for the specific language governing permissions and limitations under
11+
the License.
12+
13+
-->
14+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
16+
<modelVersion>4.0.0</modelVersion>
17+
<name>graphql-builder</name>
18+
<description>Builds a graphql schema from a model using reflection</description>
19+
20+
<parent>
21+
<groupId>com.phocassoftware</groupId>
22+
<artifactId>graphql-builder-parent</artifactId>
23+
<version>1.0.10-SNAPSHOT</version>
24+
</parent>
25+
26+
<artifactId>graphql-builder</artifactId>
27+
28+
<properties>
29+
<junit.jupiter.version>5.12.1</junit.jupiter.version>
30+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
31+
<jackson.version>2.18.3</jackson.version>
32+
<graphql.version>22.3</graphql.version>
33+
</properties>
34+
35+
<licenses>
36+
<license>
37+
<name>Apache License, Version 2.0</name>
38+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
39+
<distribution>repo</distribution>
40+
</license>
41+
</licenses>
42+
43+
<dependencies>
44+
<dependency>
45+
<groupId>com.graphql-java</groupId>
46+
<artifactId>graphql-java</artifactId>
47+
<version>${graphql.version}</version>
48+
</dependency>
49+
<dependency>
50+
<groupId>com.graphql-java</groupId>
51+
<artifactId>graphql-java-extended-scalars</artifactId>
52+
<version>21.0</version>
53+
</dependency>
54+
<dependency>
55+
<groupId>com.graphql-java</groupId>
56+
<artifactId>graphql-java-extended-validation</artifactId>
57+
<version>21.0</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.reflections</groupId>
61+
<artifactId>reflections</artifactId>
62+
<version>0.10.2</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>jakarta.annotation</groupId>
66+
<artifactId>jakarta.annotation-api</artifactId>
67+
<version>3.0.0</version>
68+
</dependency>
69+
<dependency>
70+
<groupId>jakarta.validation</groupId>
71+
<artifactId>jakarta.validation-api</artifactId>
72+
<version>3.1.0</version>
73+
</dependency>
74+
75+
<dependency>
76+
<groupId>com.fasterxml.jackson.core</groupId>
77+
<artifactId>jackson-databind</artifactId>
78+
<version>${jackson.version}</version>
79+
<scope>test</scope>
80+
</dependency>
81+
<dependency>
82+
<groupId>com.fasterxml.jackson.module</groupId>
83+
<artifactId>jackson-module-parameter-names</artifactId>
84+
<version>${jackson.version}</version>
85+
<scope>test</scope>
86+
</dependency>
87+
<dependency>
88+
<groupId>com.fasterxml.jackson.datatype</groupId>
89+
<artifactId>jackson-datatype-jdk8</artifactId>
90+
<version>${jackson.version}</version>
91+
<scope>test</scope>
92+
</dependency>
93+
<dependency>
94+
<groupId>com.fasterxml.jackson.datatype</groupId>
95+
<artifactId>jackson-datatype-jsr310</artifactId>
96+
<version>${jackson.version}</version>
97+
<scope>test</scope>
98+
</dependency>
99+
<dependency>
100+
<groupId>io.reactivex.rxjava3</groupId>
101+
<artifactId>rxjava</artifactId>
102+
<version>3.1.10</version>
103+
<scope>test</scope>
104+
</dependency>
105+
<dependency>
106+
<groupId>org.junit.jupiter</groupId>
107+
<artifactId>junit-jupiter</artifactId>
108+
<version>${junit.jupiter.version}</version>
109+
<scope>test</scope>
110+
</dependency>
111+
<dependency>
112+
<groupId>org.skyscreamer</groupId>
113+
<artifactId>jsonassert</artifactId>
114+
<version>1.5.3</version>
115+
<scope>test</scope>
116+
</dependency>
117+
</dependencies>
118+
</project>

src/main/java/com/fleetpin/graphql/builder/Authorizer.java renamed to graphql-builder/src/main/java/com/phocassoftware/graphql/builder/Authorizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
* or implied. See the License for the specific language governing permissions and limitations under
1010
* the License.
1111
*/
12-
package com.fleetpin.graphql.builder;
12+
package com.phocassoftware.graphql.builder;
1313

1414
public interface Authorizer {}

src/main/java/com/fleetpin/graphql/builder/AuthorizerSchema.java renamed to graphql-builder/src/main/java/com/phocassoftware/graphql/builder/AuthorizerSchema.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* or implied. See the License for the specific language governing permissions and limitations under
1010
* the License.
1111
*/
12-
package com.fleetpin.graphql.builder;
12+
package com.phocassoftware.graphql.builder;
1313

14-
import static com.fleetpin.graphql.builder.EntityUtil.isContext;
14+
import static com.phocassoftware.graphql.builder.EntityUtil.isContext;
1515

1616
import graphql.GraphQLContext;
1717
import graphql.GraphqlErrorException;
@@ -186,7 +186,7 @@ public DataFetcher<?> wrap(DataFetcher<?> fetcher, Method method) {
186186
throw GraphqlErrorException.newErrorException().message("unauthorized").errorClassification(ErrorType.UNAUTHORIZED).build();
187187
}
188188
} else {
189-
//only other type that passes checks above
189+
// only other type that passes checks above
190190
CompletableFuture<Boolean> allowed = (CompletableFuture<Boolean>) allow;
191191

192192
return allowed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
package com.phocassoftware.graphql.builder;
13+
14+
import graphql.schema.DataFetcher;
15+
import java.lang.reflect.Method;
16+
17+
public interface DataFetcherRunner {
18+
public DataFetcher<?> manage(Method method, DataFetcher<?> fetcher);
19+
}

src/main/java/com/fleetpin/graphql/builder/DirectiveCaller.java renamed to graphql-builder/src/main/java/com/phocassoftware/graphql/builder/DirectiveCaller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* or implied. See the License for the specific language governing permissions and limitations under
1010
* the License.
1111
*/
12-
package com.fleetpin.graphql.builder;
12+
package com.phocassoftware.graphql.builder;
1313

1414
import graphql.schema.DataFetcher;
1515
import graphql.schema.DataFetchingEnvironment;

src/main/java/com/fleetpin/graphql/builder/DirectiveOperation.java renamed to graphql-builder/src/main/java/com/phocassoftware/graphql/builder/DirectiveOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* or implied. See the License for the specific language governing permissions and limitations under
1010
* the License.
1111
*/
12-
package com.fleetpin.graphql.builder;
12+
package com.phocassoftware.graphql.builder;
1313

1414
import java.lang.annotation.Annotation;
1515

0 commit comments

Comments
 (0)