This is an automated email from the ASF dual-hosted git repository.
egonzalez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
The following commit(s) were added to refs/heads/main by this push:
new 810909dd4 kie-issue #1974-graphql counter issue fix (#2226)
810909dd4 is described below
commit 810909dd4f4015726aa7b1d679492a44177f2c50
Author: Christine-Jose <[email protected]>
AuthorDate: Mon May 26 15:04:44 2025 +0530
kie-issue #1974-graphql counter issue fix (#2226)
Signed-off-by: christinejose <[email protected]>
---
.../kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
index 804c5e49d..31f5b65f1 100644
---
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
+++
b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
@@ -132,6 +132,8 @@ public abstract class AbstractGraphQLSchemaManager
implements GraphQLSchemaManag
if (supportsCount()) {
builder.dataFetcher("CountProcessInstances",
this::countProcessInstances);
builder.dataFetcher("CountUserTaskInstances",
this::countUserTaskInstances);
+ builder.dataFetcher("CountJobs", this::countJobs);
+ builder.dataFetcher("CountProcessDefinitions",
this::countProcessDefinitions);
}
}
@@ -256,6 +258,14 @@ public abstract class AbstractGraphQLSchemaManager
implements GraphQLSchemaManag
return executeCount(cacheService.getUserTaskInstanceStorage(), env);
}
+ protected long countJobs(DataFetchingEnvironment env) {
+ return executeCount(cacheService.getJobsStorage(), env);
+ }
+
+ protected long countProcessDefinitions(DataFetchingEnvironment env) {
+ return executeCount(cacheService.getProcessDefinitionStorage(), env);
+ }
+
protected <K, T> List<T> executeAdvancedQueryForCache(StorageFetcher<K, T>
cache, DataFetchingEnvironment env) {
Query<T> query = buildQuery(cache, env);
query.sort(new GraphQLQueryOrderByParser().apply(env));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]