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

add one of support and remove jackson #16

Merged
merged 146 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
cb3d2bc
big refactor. Cleaned up libraries and added oneOf support
ashley-taylor Mar 1, 2023
c5e47b6
cleanup and license
ashley-taylor Mar 5, 2023
beea4ea
get scalars working correctly
ashley-taylor Mar 6, 2023
1ca1768
fix incrementing bug
ashley-taylor Mar 6, 2023
07944c8
more refactoring and add more tests
ashley-taylor Mar 7, 2023
cad46a7
don't add directives twice
ashley-taylor Mar 7, 2023
b4dc9cd
Update pom.xml
ashley-taylor Mar 8, 2023
110f1d8
Update pom.xml
ashley-taylor Mar 8, 2023
6e0f496
Update release.yml
ashley-taylor Mar 8, 2023
f8c3b14
[maven-release-plugin] prepare release graphql-builder-2.0.0
Mar 8, 2023
96629a8
[maven-release-plugin] prepare for next development iteration
Mar 8, 2023
c5b1517
fix nulls in record creation.
ashley-taylor Mar 10, 2023
49e0166
Merge branch 'master' of https://github.com/ashley-taylor/graphql-bui…
ashley-taylor Mar 10, 2023
9011465
[maven-release-plugin] prepare release graphql-builder-2.0.1
Mar 10, 2023
6f6adee
[maven-release-plugin] prepare for next development iteration
Mar 10, 2023
2a87b77
add @Nullable support.
ashley-taylor Mar 13, 2023
efac7a6
Merge branch 'master' of https://github.com/ashley-taylor/graphql-bui…
ashley-taylor Mar 13, 2023
6726b87
[maven-release-plugin] prepare release graphql-builder-2.0.2
Mar 13, 2023
b232f6d
[maven-release-plugin] prepare for next development iteration
Mar 13, 2023
84ea7cf
add description on fields
ashley-taylor Mar 31, 2023
c029083
Merge branch 'master' of https://github.com/ashley-taylor/graphql-bui…
ashley-taylor Mar 31, 2023
8a1dd35
[maven-release-plugin] prepare release graphql-builder-2.0.3
Mar 31, 2023
84dd735
[maven-release-plugin] prepare for next development iteration
Mar 31, 2023
bbc64cd
fix parameter descriptions. Add tests
ashley-taylor Apr 4, 2023
99c2f58
[maven-release-plugin] prepare release graphql-builder-2.0.4
Apr 4, 2023
ab754e3
[maven-release-plugin] prepare for next development iteration
Apr 4, 2023
cfc028f
add jakarta support
ashley-taylor Apr 4, 2023
cd2942b
Merge branch 'master' of https://github.com/ashley-taylor/graphql-bui…
ashley-taylor Apr 4, 2023
066f526
[maven-release-plugin] prepare release graphql-builder-2.0.5
Apr 4, 2023
dd31d26
[maven-release-plugin] prepare for next development iteration
Apr 4, 2023
0a3037c
Added InvalidOneOfException and removed TODO from tests
hmedlinphocas Jul 3, 2023
6f7fc90
Merge pull request #1 from hmedlinphocas/throw-named-exception-on-one…
ashley-taylor Jul 3, 2023
144241f
[maven-release-plugin] prepare release graphql-builder-2.0.6
Jul 3, 2023
f936074
[maven-release-plugin] prepare for next development iteration
Jul 3, 2023
616cc6a
Update pom.xml
ashley-taylor Jul 3, 2023
c1e5036
[maven-release-plugin] prepare release graphql-builder-2.0.7
Jul 3, 2023
a3b31e4
[maven-release-plugin] prepare for next development iteration
Jul 3, 2023
5b68b0e
Update pom.xml
ashley-taylor Jul 3, 2023
05ba130
[maven-release-plugin] prepare release graphql-builder-2.0.8
Jul 3, 2023
5fffa32
[maven-release-plugin] prepare for next development iteration
Jul 3, 2023
be66269
add ability to add Fetcher Factory to support virtual threads
ashley-taylor Sep 24, 2023
be195a5
support java 11
ashley-taylor Sep 24, 2023
70a8549
missed one
ashley-taylor Sep 24, 2023
20d7ff5
[maven-release-plugin] prepare release graphql-builder-2.0.9
Sep 24, 2023
c05934f
[maven-release-plugin] prepare for next development iteration
Sep 24, 2023
0cf6c03
Add functionality for custom directives to be on parameters/arguments
callum-rutledge Dec 4, 2023
eaad172
Stopped ignoring the exception when invoking method calls
callum-rutledge Dec 4, 2023
61e4ecd
Fixed typo
callum-rutledge Dec 4, 2023
a237b8b
More typos fixed
callum-rutledge Dec 4, 2023
1f3b29c
Fix bug where the program would raise an exception upon starting due …
callum-rutledge Dec 4, 2023
4681445
Created the @DirectiveLocations annotation as a temporary change whil…
callum-rutledge Dec 4, 2023
74f1c31
Converting code to run through the DirectiveProcessor
callum-rutledge Dec 4, 2023
e98a312
Refactor testing annotations to fit new layout
callum-rutledge Dec 4, 2023
72042f1
Refactor testing annotations to fit new layout
callum-rutledge Dec 4, 2023
e359471
New tests added for the Argument directives
callum-rutledge Dec 4, 2023
d7043a0
Removing old unused classes
callum-rutledge Dec 4, 2023
d02db0e
New Tests added
callum-rutledge Dec 4, 2023
47ed0cd
Added back functionality for DirectiveCaller whilst waiting for more …
callum-rutledge Dec 4, 2023
5491b78
Merged @DirectiveLocations into @Directive
callum-rutledge Dec 5, 2023
b1c2ffd
Merged @DirectiveLocations into @Directive
callum-rutledge Dec 5, 2023
21c721f
Code cleanup + removing TODOs that have been done
callum-rutledge Dec 5, 2023
be45bd9
Refactoring Directive annotation and the logic behind it to separate …
callum-rutledge Dec 5, 2023
49b075d
Refactoring Directive annotation and the logic behind it to separate …
callum-rutledge Dec 5, 2023
4566b29
Update the argument level directive handling so that they can take mo…
callum-rutledge Dec 5, 2023
7ae2743
Remove finished // TODO
callum-rutledge Dec 5, 2023
d71378f
Update release.yml
ashley-taylor Dec 6, 2023
8994d9f
Ran mvn prettier
callum-rutledge Dec 6, 2023
0c27e75
Updated README.md to represent new changes
callum-rutledge Dec 6, 2023
ca44a82
Merge pull request #2 from callum-rutledge/master
ashley-taylor Dec 6, 2023
4f46c12
Create release.sh
ashley-taylor Dec 7, 2023
ad7d4c5
Delete scripts/release.sh
ashley-taylor Dec 7, 2023
3c68d01
Update release.yml
ashley-taylor Dec 7, 2023
e348637
Update release.yml
ashley-taylor Dec 8, 2023
e16e845
[maven-release-plugin] prepare release graphql-builder-2.0.10
Dec 8, 2023
d54b4ef
[maven-release-plugin] prepare for next development iteration
Dec 8, 2023
d67d815
Update release.yml
ashley-taylor Dec 8, 2023
6e52ea8
[maven-release-plugin] prepare release graphql-builder-2.0.11
Dec 8, 2023
8064a2d
[maven-release-plugin] prepare for next development iteration
Dec 8, 2023
c0d194a
bump graphql to 22.2, compile fixes, test updates
itstheceo Aug 19, 2024
f85050f
throw if unchecked
itstheceo Aug 22, 2024
9b8aab4
fix bug with input generics
ashley-taylor Aug 23, 2024
e3eb8d8
add rename CICD java 21 updarte
ashley-taylor Aug 25, 2024
27b91ac
latest graphql
ashley-taylor Aug 25, 2024
7ec3712
Merge pull request #3 from itstheceo/graphql-description
ashley-taylor Aug 25, 2024
d832d89
Merge remote-tracking branch 'origin/master' into fix-input-generic
ashley-taylor Aug 25, 2024
b0fc8e4
get CICD passing
ashley-taylor Aug 25, 2024
0aa0991
Merge pull request #4 from ashley-taylor/fix-input-generic
ashley-taylor Aug 25, 2024
8b2301c
Update dependency io.reactivex.rxjava3:rxjava to v3.1.9
renovate[bot] Aug 25, 2024
e3f3630
Update dependency com.hubspot.maven.plugins:prettier-maven-plugin to …
renovate[bot] Aug 25, 2024
9c64752
Merge pull request #6 from ashley-taylor/renovate/com.hubspot.maven.p…
ashley-taylor Aug 25, 2024
9c462ed
Merge pull request #5 from ashley-taylor/renovate/io.reactivex.rxjava…
ashley-taylor Aug 25, 2024
bf647cf
Update dependency com.mycila:license-maven-plugin to v4.5
renovate[bot] Aug 25, 2024
9084324
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
renovate[bot] Aug 25, 2024
90bc4e9
Update dependency org.junit.jupiter:junit-jupiter to v5.11.0
renovate[bot] Aug 25, 2024
b83cf9b
Update dependency org.pitest:pitest-maven to v1.16.1
renovate[bot] Aug 25, 2024
8869c2e
Update dependency org.sonatype.plugins:nexus-staging-maven-plugin to …
renovate[bot] Aug 25, 2024
0df670b
Merge pull request #7 from ashley-taylor/renovate/com.mycila-license-…
ashley-taylor Aug 25, 2024
bc8bec6
Update dependency jakarta.annotation:jakarta.annotation-api to v3
renovate[bot] Aug 25, 2024
ae63ab2
Merge pull request #11 from ashley-taylor/renovate/pitest.version
ashley-taylor Aug 25, 2024
f089ace
Update dependency org.apache.maven.plugins:maven-gpg-plugin to v3
renovate[bot] Aug 25, 2024
9b17e38
Update dependency org.apache.maven.plugins:maven-release-plugin to v3
renovate[bot] Aug 25, 2024
b9b6f28
Merge pull request #9 from ashley-taylor/renovate/junit.jupiter.version
ashley-taylor Aug 25, 2024
f17cf20
Update dependency org.pitest:pitest-junit5-plugin to v1.2.1
renovate[bot] Aug 25, 2024
1a3804d
Update jackson.version to v2.17.2
renovate[bot] Aug 25, 2024
1861edf
Merge pull request #16 from ashley-taylor/renovate/jakarta.annotation…
ashley-taylor Aug 25, 2024
c707458
Merge pull request #18 from ashley-taylor/renovate/org.apache.maven.p…
ashley-taylor Aug 25, 2024
5389ec9
Merge pull request #17 from ashley-taylor/renovate/org.apache.maven.p…
ashley-taylor Aug 25, 2024
0356620
Merge pull request #13 from ashley-taylor/renovate/jackson.version
ashley-taylor Aug 25, 2024
384f12f
Merge pull request #12 from ashley-taylor/renovate/org.sonatype.plugi…
ashley-taylor Aug 25, 2024
83e00d3
Merge pull request #10 from ashley-taylor/renovate/pitest-junit5-plug…
ashley-taylor Aug 25, 2024
075a4f5
Merge pull request #8 from ashley-taylor/renovate/org.apache.maven.pl…
ashley-taylor Aug 25, 2024
9245b94
[maven-release-plugin] prepare release graphql-builder-3.0.0
Aug 25, 2024
5ceb901
[maven-release-plugin] prepare for next development iteration
Aug 25, 2024
5ec5027
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
renovate[bot] Aug 27, 2024
9fbecfa
Update dependency org.pitest:pitest-maven to v1.16.3
renovate[bot] Sep 2, 2024
820cf54
fixing nested generic bug
ashley-taylor Sep 4, 2024
e451747
Merge pull request #20 from ashley-taylor/renovate/pitest.version
ashley-taylor Sep 4, 2024
eaf975e
Merge pull request #19 from ashley-taylor/renovate/org.apache.maven.p…
ashley-taylor Sep 4, 2024
584d036
Merge pull request #21 from ashley-taylor/fix-nested-generic-bug
ashley-taylor Sep 4, 2024
01363f2
[maven-release-plugin] prepare release graphql-builder-3.0.1
Sep 4, 2024
8087504
[maven-release-plugin] prepare for next development iteration
Sep 4, 2024
b99f42e
Update dependency com.graphql-java:graphql-java to v22.3
renovate[bot] Sep 5, 2024
71359c2
fix nullable bug. Was applying on inner element not outer.
ashley-taylor Sep 5, 2024
d9a44b7
Merge pull request #22 from ashley-taylor/renovate/graphql.version
ashley-taylor Sep 5, 2024
0a2dc52
Merge pull request #23 from ashley-taylor/nullable-annotation-collect…
ashley-taylor Sep 5, 2024
9b9141c
[maven-release-plugin] prepare release graphql-builder-3.0.2
Sep 5, 2024
89ba166
[maven-release-plugin] prepare for next development iteration
Sep 5, 2024
e671fc9
Update dependency org.pitest:pitest-maven to v1.17.0
renovate[bot] Sep 17, 2024
5a2df8c
Update dependency com.mycila:license-maven-plugin to v4.6
renovate[bot] Sep 25, 2024
3c17476
Update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.7
renovate[bot] Sep 27, 2024
7cb8604
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
renovate[bot] Oct 1, 2024
0c6dab1
Update dependency org.junit.jupiter:junit-jupiter to v5.11.2
renovate[bot] Oct 4, 2024
b49e61b
add restrict to parent class
ashley-taylor Oct 11, 2024
2e47816
ability to mark inner entity as nullable
ashley-taylor Oct 11, 2024
9524fde
Merge pull request #24 from ashley-taylor/renovate/org.apache.maven.p…
ashley-taylor Oct 11, 2024
b727ee9
Merge pull request #25 from ashley-taylor/renovate/pitest.version
ashley-taylor Oct 11, 2024
6056f77
Merge pull request #26 from ashley-taylor/renovate/junit.jupiter.version
ashley-taylor Oct 11, 2024
67a8eac
Update jackson.version to v2.18.0
renovate[bot] Oct 11, 2024
04c8ae2
Merge pull request #27 from ashley-taylor/renovate/com.mycila-license…
ashley-taylor Oct 11, 2024
5b18e9c
Merge pull request #29 from ashley-taylor/renovate/org.apache.maven.p…
ashley-taylor Oct 11, 2024
ac213e7
Merge pull request #30 from ashley-taylor/restrict-on-parent-class
ashley-taylor Oct 11, 2024
4e6ffaf
Update release.yml
ashley-taylor Oct 11, 2024
0548fa6
Merge pull request #28 from ashley-taylor/renovate/jackson.version
ashley-taylor Oct 11, 2024
b58510f
Merge pull request #31 from ashley-taylor/ability-to-mark-the-inner-e…
ashley-taylor Oct 11, 2024
b6e51eb
[maven-release-plugin] prepare release graphql-builder-3.1.0
Oct 11, 2024
ee2f11c
[maven-release-plugin] prepare for next development iteration
Oct 11, 2024
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
109 changes: 85 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,90 @@
name: Release
on:
workflow_dispatch
permissions:
contents: write
packages: write
on:
workflow_dispatch:
inputs:
releaseType:
type: choice
description: "Release type"
required: true
default: minor
options:
- patch
- minor
- major
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Release
uses: qcastel/[email protected]
with:
release-branch-name: "master"
maven-args: "-P sonatype"
git-release-bot-name: "release-bot"
git-release-bot-email: "[email protected]"

gpg-enabled: "true"
gpg-key-id: ${{ secrets.GPG_KEY_ID }}
gpg-key: ${{ secrets.GPG_KEY }}

maven-repo-server-id: sonatype
maven-repo-server-username: ${{ secrets.MVN_REPO_PRIVATE_REPO_USER }}
maven-repo-server-password: ${{ secrets.MVN_REPO_PRIVATE_REPO_PASSWORD }}

access-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: zulu
- uses: whelk-io/maven-settings-xml-action@v22
with:
servers: >
[
{ "id": "sonatype", "username": "${{ secrets.MVN_REPO_PRIVATE_REPO_USER }}", "password": "${{ secrets.MVN_REPO_PRIVATE_REPO_PASSWORD }}" }
]
- name: set name
run: |
git config --global user.name "release-bot";
git config --global user.email "[email protected]";

- name: add key
run: |
echo "${{ secrets.GPG_KEY }}" | base64 -d > private.key
gpg --batch --import ./private.key
rm ./private.key
gpg --list-secret-keys --keyid-format LONG

- name: Get current development version
id: get_version
run: |
VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//' )
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Generate versions
id: generate_versions
uses: WyriHaximus/[email protected]
with:
version: ${{ steps.get_version.outputs.version }}

- name: Pick release version
id: pick_release_version
run: |
VERSION=$(
case ${{ github.event.inputs.releaseType }} in
("minor") echo "${{ steps.generate_versions.outputs.minor }}" ;;
("major") echo "${{ steps.generate_versions.outputs.major }}" ;;
("patch") echo "${{ steps.generate_versions.outputs.patch }}" ;;
esac
)
echo "version=$VERSION" >> $GITHUB_OUTPUT


- name: prepare
run: |
mvn release:prepare -Dusername=${{ secrets.GITHUB_TOKEN }} \
-DreleaseVersion=${{ steps.pick_release_version.outputs.version }} \
-DdevelopmentVersion=${{ steps.pick_release_version.outputs.version }}-SNAPSHOT \
-P sonatype

- name: release
run: |
mvn release:perform -Dusername=${{ secrets.GITHUB_TOKEN }} \
-DreleaseVersion=${{ steps.pick_release_version.outputs.version }} \
-DdevelopmentVersion=${{ steps.pick_release_version.outputs.version }}-SNAPSHOT \
-Darguments="-DskipTests" \
-P sonatype
29 changes: 15 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
name: Test
on:
on:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn -B test --file pom.xml
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: zulu
- name: Build with Maven
run: mvn -B test --file pom.xml
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/target/
/.classpath
/.project
.settings
.settings
.idea/*

36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,42 @@ public class AssetRestrict implements RestrictType<Animal> {

## Directives
These are similar to GraphQL directives but just implemented on the java model
You define a custom annotation and add the `@Directive` to it
This annotation in then passed into the DirectiveCaller allowing you to add options to the annotation if need be
You define a custom annotation and add the `@Directive` to it.
The directive annotation must contain an array of DirectiveLocations which will be used in the GraphQL definition.
Any function defined in the annotation will be placed on the schema definition as an argument.

```java
@Retention(RUNTIME)
@Directive(AdminOnly.AdminOnlyDirective.class)
@Directive( { Introspection.DirectiveLocation.FIELD_DEFINITION } )
public @interface CustomDirective {
String input();
}
```
This directive can now be placed where set:
```java
@Query
@CustomDirective(input = "Custom Directive Contents")
public static String sayHello() {
return "Hello world";
}
```
Which will then end up on the schema like so
```graphql
directive @CustomDirective(input: String!) on FIELD_DEFINITION

type Query {
sayHello: String! @CustomDirective(input: "Custom Directive Contents")
}
```

## DataFetcherWrapper
Similar to the setup of a Directive the DataFetcherWrapper is created as an
annotation. This annotation is then passed into the DirectiveCaller allowing
you to add options to the annotation if need be

```java
@Retention(RUNTIME)
@DataFetcherWrapper(AdminOnly.AdminOnlyDirective.class)
public @interface AdminOnly {
...
}
Expand Down
Loading