Skip to content

Commit a3a7c55

Browse files
committed
Merge branch 'master' into configurableDateFormat
# Conflicts: # graphql-jpa-query-schema/src/main/java/com/introproventures/graphql/jpa/query/schema/JavaScalars.java
2 parents 05a1245 + e92a875 commit a3a7c55

File tree

28 files changed

+1043
-716
lines changed

28 files changed

+1043
-716
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ target/
2323
.springBeans
2424

2525

26+
27+
graphql-jpa-query-schema/\.classpath
28+
29+
graphql-jpa-query-annotations/\.classpath
30+
31+
graphql-jpa-query-example/\.classpath
32+
33+
graphql-jpa-query-boot-starter/\.classpath

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Change Log
22

3-
## 0.3.6-SNAPSHOT
3+
## 0.3.10-SNAPSHOT
4+
* Merge pull request #55 from introproventures/fix-EQ-string-sql-predicate [db3c1ef](null/commit/db3c1efee917496115c2037da99dd0e75c385f3a)
5+
* fix: add missing equal criteria expression for string type where arguments [aaadba1](null/commit/aaadba127d3b197438c66647280a7d561006571c)
6+
* Merge pull request #54 from ludovicmotte/embeddedWhere [95ad2ad](null/commit/95ad2ad07d7d3a3277fbf362b06aa606d56b47e3)
7+
* query for entity with emeddableType and where argument [c1f2e48](null/commit/c1f2e4802b932b9ec67ff8d391a9b46e2556fd32)
8+
* fix: (version) update graphql-java to 9.4 (#52) [56cef8b](null/commit/56cef8b536db00905dce4c4a721833aa8aa6d47e)
9+
* fix: reverse query with where enum criteria [86a68aa](null/commit/86a68aa02f49289fbd893a821760d4ecca77869a)
10+
* fix: improve page argument handling [dd7fe62](null/commit/dd7fe6272f94ef87cccd8056398f845334b863c8)
11+
* chore: skip deploy for graphql-jpa-query-example module [8950021](null/commit/8950021d7d0495ecc57b9726ec2b3c6b7e00bf0d)
12+
* feat: improve PropertyDataFetcher performance with caching [fa9f08e](null/commit/fa9f08e46ae03b16ab464eaf9f3856c53671fca7)
13+
* chore: refactor test entity models to use Lazy fetch by default [a2deb40](null/commit/a2deb40f2b5eef489eff306fa79e457ee3e85ff9)
14+
* feat: add more Java Scalars [ad32245](null/commit/ad3224588e89378697bafb3f793aaf90b953acce)
15+
* fix: Support Enum types in EQ, NE, IN, NIN criteria expressions (#50) [12dc200](null/commit/12dc200f3b4efe10e9f8d98b261a82605aad1727)
16+
* Add Byte to JavaScalars (#48) [6407149](null/commit/64071491e7f7ea940696ee091528ba839ca417ad)
417
* Fix generated CriteriaExpression not working with UUIDs (#42) [b75e740](null/commit/b75e740f0bb358f723eda06cbbae73340527fe21)
518
* Include Java Char and BigInteger types support in JavaScalars (#43) [d431dd1](null/commit/d431dd1c51f1e1632cb00bc0b6dec99b22ce6795)
619
* Support @MappedSuperclass and @Embedded jpa annotations (#35) [09807ac](null/commit/09807ac4988f986b669ad60307c868d4590bdd34)

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ GraphQL Query for JPA Entity Model
66
[![Maven Central](https://img.shields.io/maven-central/v/com.introproventures/graphql-jpa-query.svg)](https://mvnrepository.com/artifact/com.introproventures/graphql-jpa-query)
77
[![Jitpack.io](https://jitpack.io/v/introproventures/graphql-jpa-query.svg)](https://jitpack.io/#introproventures/graphql-jpa-query)
88

9-
This library uses [graphql-java 6.0](https://github.com/andimarek/graphql-java) to derive and build the GraphQL schema from JPA Entity Schema provided by entity classes.
9+
This library uses [graphql-java 9.4](https://github.com/andimarek/graphql-java) to derive and build the GraphQL schema from JPA Entity Schema provided by entity classes.
1010

1111
It implements a schema builder to generate GraphQL Schema using JPA EntityManager with JPA Query Data Fetchers that transform GraphQL queries into JPA queries with flexible type safe criteria expressions and user-friendly SQL query syntax semantics i.e. query by page, , where criteria expressions, select, order by etc.
1212

@@ -320,8 +320,12 @@ of sorting by name for Human objects. The default sort order can be specified us
320320

321321
Performance
322322
-----------
323+
Lazy loading of associations between entities is a well established best practice in JPA. Its main goal is to retrieve only the requested entities from the database and load the related entities only if needed. The use of FetchType.EAGER for associations mapping is one of the most common reasons for performance problems, because Hibernate loads eagerly fetched associations when it loads an entity. This is very inefficient and it gets even worse when you consider that Hibernate does that whether or not you will use the associated data.
324+
323325
The JPA DataFetcher implementation will attempt to build dynamic fetch graph in order to optimize query performance and avoid N+1 lazy loading. However, if there are composite foreign keys being used on `@ManyToOne` association declared in GraphQL query, Hibernate persistence provider will issue a separate SQL query to resolve the parent entity.
324326

327+
To disable default `@ManyToOne` associations behavior with eager fetch, make explicit use of FetchType.LAZY for all associations in your entity model. It will delay the initialization of the relationship unless it is specified in the GraphQL query entity graph to improve performance when fetching many entities with their associations.
328+
325329
GraphiQL Browser
326330
--------
327331

graphql-jpa-query-annotations/.classpath

Lines changed: 0 additions & 42 deletions
This file was deleted.

graphql-jpa-query-annotations/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
<parent>
77
<groupId>com.introproventures</groupId>
8-
<artifactId>graphql-jpa-query</artifactId>
9-
<version>0.3.6-SNAPSHOT</version>
10-
<relativePath>../pom.xml</relativePath>
8+
<artifactId>graphql-jpa-query-dependencies</artifactId>
9+
<version>0.3.10-SNAPSHOT</version>
10+
<relativePath>../graphql-jpa-query-dependencies</relativePath>
1111
</parent>
1212

1313
<modelVersion>4.0.0</modelVersion>

graphql-jpa-query-boot-starter/.classpath

Lines changed: 0 additions & 47 deletions
This file was deleted.

graphql-jpa-query-boot-starter/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
<parent>
88
<groupId>com.introproventures</groupId>
9-
<artifactId>graphql-jpa-query</artifactId>
10-
<version>0.3.6-SNAPSHOT</version>
11-
<relativePath>../pom.xml</relativePath>
9+
<artifactId>graphql-jpa-query-build</artifactId>
10+
<version>0.3.10-SNAPSHOT</version>
11+
<relativePath>../graphql-jpa-query-build</relativePath>
1212
</parent>
1313

1414
<dependencies>

graphql-jpa-query-build/pom.xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<parent>
4+
<groupId>com.introproventures</groupId>
5+
<artifactId>graphql-jpa-query-dependencies</artifactId>
6+
<version>0.3.10-SNAPSHOT</version>
7+
<relativePath>../graphql-jpa-query-dependencies</relativePath>
8+
</parent>
9+
<artifactId>graphql-jpa-query-build</artifactId>
10+
<packaging>pom</packaging>
11+
12+
<dependencyManagement>
13+
<dependencies>
14+
15+
<dependency>
16+
<groupId>io.spring.platform</groupId>
17+
<artifactId>platform-bom</artifactId>
18+
<version>Brussels-SR6</version>
19+
<type>pom</type>
20+
<scope>import</scope>
21+
</dependency>
22+
23+
</dependencies>
24+
25+
</dependencyManagement>
26+
27+
<dependencies>
28+
29+
<dependency>
30+
<groupId>org.springframework.boot</groupId>
31+
<artifactId>spring-boot-starter-test</artifactId>
32+
<scope>test</scope>
33+
</dependency>
34+
35+
<dependency>
36+
<groupId>org.projectlombok</groupId>
37+
<artifactId>lombok</artifactId>
38+
<scope>test</scope>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>com.h2database</groupId>
43+
<artifactId>h2</artifactId>
44+
<scope>test</scope>
45+
</dependency>
46+
47+
</dependencies>
48+
49+
</project>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<parent>
4+
<groupId>com.introproventures</groupId>
5+
<artifactId>graphql-jpa-query</artifactId>
6+
<version>0.3.10-SNAPSHOT</version>
7+
<relativePath>..</relativePath>
8+
</parent>
9+
<artifactId>graphql-jpa-query-dependencies</artifactId>
10+
<packaging>pom</packaging>
11+
12+
<properties>
13+
<graphql-java.version>9.4</graphql-java.version>
14+
<hibernate-jpa-2.1-api.version>1.0.0.Final</hibernate-jpa-2.1-api.version>
15+
</properties>
16+
17+
<dependencyManagement>
18+
<dependencies>
19+
20+
<dependency>
21+
<groupId>com.graphql-java</groupId>
22+
<artifactId>graphql-java</artifactId>
23+
<version>${graphql-java.version}</version>
24+
</dependency>
25+
26+
<dependency>
27+
<groupId>org.hibernate.javax.persistence</groupId>
28+
<artifactId>hibernate-jpa-2.1-api</artifactId>
29+
<version>${hibernate-jpa-2.1-api.version}</version>
30+
</dependency>
31+
32+
<dependency>
33+
<groupId>com.introproventures</groupId>
34+
<artifactId>graphql-jpa-query-annotations</artifactId>
35+
<version>${project.version}</version>
36+
</dependency>
37+
38+
<dependency>
39+
<groupId>com.introproventures</groupId>
40+
<artifactId>graphql-jpa-query-schema</artifactId>
41+
<version>${project.version}</version>
42+
</dependency>
43+
44+
<dependency>
45+
<groupId>com.introproventures</groupId>
46+
<artifactId>graphql-jpa-query-boot-starter</artifactId>
47+
<version>${project.version}</version>
48+
</dependency>
49+
50+
</dependencies>
51+
52+
</dependencyManagement>
53+
54+
</project>

graphql-jpa-query-example/.classpath

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)