From 177b99897462d9d45774ccf028019f2c1cdab2ce Mon Sep 17 00:00:00 2001 From: Mirko Zizzari Date: Wed, 30 Aug 2023 12:29:30 +0200 Subject: [PATCH] Issue #547: adds GraphQL query by parent --- .../graphql/DocTypeFieldGraphqlResource.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/app/datasource/src/main/java/io/openk9/datasource/graphql/DocTypeFieldGraphqlResource.java b/core/app/datasource/src/main/java/io/openk9/datasource/graphql/DocTypeFieldGraphqlResource.java index 3315c63ba..43fc2d2d6 100644 --- a/core/app/datasource/src/main/java/io/openk9/datasource/graphql/DocTypeFieldGraphqlResource.java +++ b/core/app/datasource/src/main/java/io/openk9/datasource/graphql/DocTypeFieldGraphqlResource.java @@ -40,6 +40,17 @@ public Uni> getDocTypeFields( after, before, first, last, searchText, sortByList); } + @Query + public Uni> getDocTypeFields( + @Description("fetching only nodes after this node (exclusive)") String after, + @Description("fetching only nodes before this node (exclusive)") String before, + @Description("fetching only the first certain number of nodes") Integer first, + @Description("fetching only the last certain number of nodes") Integer last, + long parentId, String searchText, Set sortByList) { + return docTypeFieldService.findConnection( + parentId, after, before, first, last, searchText, sortByList); + } + public Uni parent( @Source DocTypeField docTypeField) { return docTypeFieldService.getParent(docTypeField);