From 2ac818f4e9a9bab0b194ac36c5fd69f3d1ced461 Mon Sep 17 00:00:00 2001 From: babyfish-ct Date: Wed, 20 Apr 2022 22:20:52 +0800 Subject: [PATCH 1/5] Update graphql-provider.md --- .../java-kotlin-android/server/graphql-provider.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md b/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md index f0650660d0..1db6c1cf25 100644 --- a/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md +++ b/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md @@ -15,6 +15,8 @@ github: babyfish-ct/graphql-provider 5. For mutation operations, the inputs type can be automatically generated according to a simple configuration, develpers only need to focus on entity objects, not input objects. At runtime, the framework can automatically convert the input object to a dynamic entity object tree and you only need one sentence to save any complex entity object tree to the database. +6. Integrated Spring security and JWT. Allows users to authorize by behavior, authorize by column, and authorize by row through the kotlin DSL. + **Here is a simple example** > Due to space limitations, all *EntityMapper*s only uses a static mapping configuration similar to ORM, and does not use a more dynamic code configuration. For a complete demonstration, please refer to the example and documentation of the project itself. @@ -76,7 +78,7 @@ github: babyfish-ct/graphql-provider // that means its pagination query. // pagination arguments such as "first", "after", "last", "before" // will be added by framework automactically and implicitly - fun findBooks( + suspend fun findBooks( name: String?, storeName: String? ): Connection = From bcebf4b61a5cbcf975cbf373bec8b1b7a4dc06c1 Mon Sep 17 00:00:00 2001 From: babyfish-ct Date: Thu, 28 Apr 2022 04:51:27 +0800 Subject: [PATCH 2/5] Update graphql-provider.md --- .../java-kotlin-android/server/graphql-provider.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md b/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md index 1db6c1cf25..c0752a2a85 100644 --- a/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md +++ b/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md @@ -5,6 +5,8 @@ url: https://github.com/babyfish-ct/graphql-provider github: babyfish-ct/graphql-provider --- +Video: https://www.youtube.com/watch?v=5UxmkNbCe0Q + 1. It is a GRM (GraphQL-Relation mapping), and its usage is similar to ORM. When kotlin dsl is used to complete the mapping configuration between entities and tables, GraphQL objects and associations are automatically completed, including the runtime association-level DataLoader and related batch loading optimization. 2. It is easy to add user implemention fields to entity, where you can implement business-related calculations. User implementation fields can also enjoy the automatic generated DataLoader and related batch loading optimization at runtime. From b0e952efbdac6c53ae1347d91dcee22529ff63f8 Mon Sep 17 00:00:00 2001 From: babyfish-ct Date: Fri, 26 Aug 2022 00:38:04 +0800 Subject: [PATCH 3/5] graphql-provider is deprecated by jimmer --- .../java-kotlin-android/server/jimmer.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/content/code/language-support/java-kotlin-android/server/jimmer.md diff --git a/src/content/code/language-support/java-kotlin-android/server/jimmer.md b/src/content/code/language-support/java-kotlin-android/server/jimmer.md new file mode 100644 index 0000000000..4309381723 --- /dev/null +++ b/src/content/code/language-support/java-kotlin-android/server/jimmer.md @@ -0,0 +1,38 @@ +--- +name: Jimmer +description: A revolutionary ORM framework for both java and kotlin, it also provides specialized API for rapid development of Spring GraphQL-based applications. +url: https://babyfish-ct.github.io/jimmer/ +github: babyfish-ct/jimmer +--- + +## Introduce + +1. SpringBoot has introduced Spring GraphQL since 2.7. Jimmer provides specialized API for rapid development of Spring GraphQL-based applications. + +2. Support two APIs: Java API & kotlin API. + +3. Powerful and GraphQL friendly caching support. + +4. Faster than other popular ORM solutions, please see the bechmark: https://babyfish-ct.github.io/jimmer/docs/benchmark/ + +5. More powerful than other popular ORM solutions. + + Three aspects should be considered in ORM design: + + a. Query. + b. Update. + c. Cache. + + Each aspect is aimed at object trees with arbitrary depth rather than simple objects. This distinctive design brings convenience unmatched by other popular solutions. + +## Links + +- Youtube vedio: https://www.youtube.com/watch?v=Rt5zNv0YR2E + +- Documentation: https://babyfish-ct.github.io/jimmer/ + +- Project Home: https://github.com/babyfish-ct/jimmer + +- GraphQL example for Java: https://github.com/babyfish-ct/jimmer/tree/main/example/java/jimmer-sql-graphql + +- GraphQL example for Kotlin: https://github.com/babyfish-ct/jimmer/tree/main/example/kotlin/jimmer-sql-graphql-kt \ No newline at end of file From 6092784d770bb39f1225d101b1e96371d04acecd Mon Sep 17 00:00:00 2001 From: babyfish-ct Date: Fri, 26 Aug 2022 00:41:05 +0800 Subject: [PATCH 4/5] graphql-provider is deprecated by jimmer --- .../server/graphql-provider.md | 100 ------------------ 1 file changed, 100 deletions(-) delete mode 100644 src/content/code/language-support/java-kotlin-android/server/graphql-provider.md diff --git a/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md b/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md deleted file mode 100644 index c0752a2a85..0000000000 --- a/src/content/code/language-support/java-kotlin-android/server/graphql-provider.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -name: graphql-provider -description: GraphQL server-side rapid development framework, it's GRM(GraphQL relation Mapping), if users use RDBMS to manage persistent data, it can help users to quickly build GraphQL services in the shortest time (based on kotlin and R2DBC) -url: https://github.com/babyfish-ct/graphql-provider -github: babyfish-ct/graphql-provider ---- - -Video: https://www.youtube.com/watch?v=5UxmkNbCe0Q - -1. It is a GRM (GraphQL-Relation mapping), and its usage is similar to ORM. When kotlin dsl is used to complete the mapping configuration between entities and tables, GraphQL objects and associations are automatically completed, including the runtime association-level DataLoader and related batch loading optimization. - -2. It is easy to add user implemention fields to entity, where you can implement business-related calculations. User implementation fields can also enjoy the automatic generated DataLoader and related batch loading optimization at runtime. - -3. Whether it is to implement query-level arguments or association-level arguments, you only need to use strongly typed SQL DSL to specify some dynamic filtering and sorting, and the rest is done automatically. - -4. If you need pagination query, there is no development cost except changing the return type of ordinary query from List<T> to Connection<T>. - -5. For mutation operations, the inputs type can be automatically generated according to a simple configuration, develpers only need to focus on entity objects, not input objects. At runtime, the framework can automatically convert the input object to a dynamic entity object tree and you only need one sentence to save any complex entity object tree to the database. - -6. Integrated Spring security and JWT. Allows users to authorize by behavior, authorize by column, and authorize by row through the kotlin DSL. - -**Here is a simple example** - -> Due to space limitations, all *EntityMapper*s only uses a static mapping configuration similar to ORM, and does not use a more dynamic code configuration. For a complete demonstration, please refer to the example and documentation of the project itself. - -1. BookStoreMapper.kt - ```kt - @Component - class BookStoreMapper: EntityMapper() { - - // Inverse one-to-many "BookStore.books" is the the - // mirror image of many-to-one association "Book.store" - mappedList(BookStore::books, Book::store) - } - } - ``` - -2. BookMapper.kt - ```kt - @Component - class BookMapper: EntityMapper() { - - override fun EntityTypeDSL.config() { - - reference(Book::store) // many-to-one - - list(Book::authors) { // many-to-many - db { - middleTable { - tableName = "BOOK_AUTHOR_MAPPING" - joinColumnName = "BOOK_ID" - targetJoinColumnName = "AUTHOR_ID" - } - } - } - } - } - ``` - -3. Author.kt - ```kt - @Component - class AuthorMapper: EntityMapper() { - - override fun EntityTypeDSL.config() { - - // Inverse many-to-many "Author.books" is the the - // mirror image of many-to-many association "Book.authors" - mappedList(Author::books, Book::authors) - } - } - ``` - -4. BookQuery.kt - ```kt - @Service - class BookQuery: Query() { - - // Return type is Connection, not List, - // that means its pagination query. - // pagination arguments such as "first", "after", "last", "before" - // will be added by framework automactically and implicitly - suspend fun findBooks( - name: String?, - storeName: String? - ): Connection = - runtime.queryConnection { - name?.let { - db { - where(table.name ilike it) - } - } - storeName?.let { - db { - where(table.store.name ilike it) - } - } - } - } - ``` From b4b5fda952cbcd56ef79ad6a417d223c6500628c Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Tue, 6 Sep 2022 14:19:29 +0100 Subject: [PATCH 5/5] Update src/content/code/language-support/java-kotlin-android/server/jimmer.md --- .../code/language-support/java-kotlin-android/server/jimmer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/code/language-support/java-kotlin-android/server/jimmer.md b/src/content/code/language-support/java-kotlin-android/server/jimmer.md index 4309381723..ea81a9ab77 100644 --- a/src/content/code/language-support/java-kotlin-android/server/jimmer.md +++ b/src/content/code/language-support/java-kotlin-android/server/jimmer.md @@ -27,7 +27,7 @@ github: babyfish-ct/jimmer ## Links -- Youtube vedio: https://www.youtube.com/watch?v=Rt5zNv0YR2E +- Youtube video: https://www.youtube.com/watch?v=Rt5zNv0YR2E - Documentation: https://babyfish-ct.github.io/jimmer/