diff --git a/autoconfigure/src/main/java/com/introproventures/graphql/jpa/query/autoconfigure/GraphQLJpaQueryGraphQlExecutionAutoConfiguration.java b/autoconfigure/src/main/java/com/introproventures/graphql/jpa/query/autoconfigure/GraphQLJpaQueryGraphQlExecutionAutoConfiguration.java index 7a92e570..ccd795df 100644 --- a/autoconfigure/src/main/java/com/introproventures/graphql/jpa/query/autoconfigure/GraphQLJpaQueryGraphQlExecutionAutoConfiguration.java +++ b/autoconfigure/src/main/java/com/introproventures/graphql/jpa/query/autoconfigure/GraphQLJpaQueryGraphQlExecutionAutoConfiguration.java @@ -28,7 +28,7 @@ public class GraphQLJpaQueryGraphQlExecutionAutoConfiguration { BatchLoaderRegistry batchLoaderRegistry(ListableBeanFactory beanFactory) { var batchLoaderRegistry = new GraphQlAutoConfiguration(beanFactory).batchLoaderRegistry(); - DataLoaderOptions options = DataLoaderOptions.newOptions().setCachingEnabled(false); + DataLoaderOptions options = DataLoaderOptions.newOptions().setCachingEnabled(false).build(); batchLoaderRegistry .forName(GraphQLJpaQueryGraphQlExecutionAutoConfiguration.class.getName()) @@ -54,7 +54,7 @@ ExecutionGraphQlService executionGraphQlService( @Bean InitializingBean batchLoaderRegistryConfigurer(BatchLoaderRegistry batchLoaderRegistry) { return () -> { - DataLoaderOptions options = DataLoaderOptions.newOptions().setCachingEnabled(false); + DataLoaderOptions options = DataLoaderOptions.newOptions().setCachingEnabled(false).build(); getMappedBatchDataLoaderMap() .forEach((name, mappedBatchLoader) -> diff --git a/autoconfigure/src/main/java/com/introproventures/graphql/jpa/query/autoconfigure/JavaScalarsRuntimeWiringConfigurer.java b/autoconfigure/src/main/java/com/introproventures/graphql/jpa/query/autoconfigure/JavaScalarsRuntimeWiringConfigurer.java index 0cc7fa61..3a27b403 100644 --- a/autoconfigure/src/main/java/com/introproventures/graphql/jpa/query/autoconfigure/JavaScalarsRuntimeWiringConfigurer.java +++ b/autoconfigure/src/main/java/com/introproventures/graphql/jpa/query/autoconfigure/JavaScalarsRuntimeWiringConfigurer.java @@ -8,6 +8,8 @@ public class JavaScalarsRuntimeWiringConfigurer implements RuntimeWiringConfigur @Override public void configure(RuntimeWiring.Builder wiringBuilder) { + wiringBuilder.strictMode(false); + JavaScalars.scalars().forEach(wiringBuilder::scalar); } } diff --git a/autoconfigure/src/test/java/com/introproventures/graphql/jpa/query/autoconfigure/GraphQLSchemaAutoConfigurationTest.java b/autoconfigure/src/test/java/com/introproventures/graphql/jpa/query/autoconfigure/GraphQLSchemaAutoConfigurationTest.java index e2f67457..0fcea517 100644 --- a/autoconfigure/src/test/java/com/introproventures/graphql/jpa/query/autoconfigure/GraphQLSchemaAutoConfigurationTest.java +++ b/autoconfigure/src/test/java/com/introproventures/graphql/jpa/query/autoconfigure/GraphQLSchemaAutoConfigurationTest.java @@ -389,7 +389,7 @@ public void enableGraphQLJpaQuerySchema() { public void directivesSupport() { assertThat(graphQLSchema.getDirectives()) .extracting(GraphQLDirective::getName) - .containsOnly("include", "skip", "specifiedBy", "deprecated", "oneOf"); + .contains("include", "skip", "specifiedBy", "deprecated", "oneOf", "defer"); } @Test diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 054817ca..a116396f 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -14,8 +14,8 @@ - 3.3.2 - 22.1 + 3.5.4 + 24.1 1.3 2.12.7 22.0 diff --git a/scalars/pom.xml b/scalars/pom.xml index e488aaf1..ec335652 100644 --- a/scalars/pom.xml +++ b/scalars/pom.xml @@ -33,6 +33,11 @@ true + + org.slf4j + slf4j-api + + diff --git a/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaExecutorContextFactory.java b/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaExecutorContextFactory.java index 51e93052..eb203f18 100644 --- a/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaExecutorContextFactory.java +++ b/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaExecutorContextFactory.java @@ -45,10 +45,13 @@ public class GraphQLJpaExecutorContextFactory implements GraphQLExecutorContextF private Supplier instrumentation = () -> new SimpleInstrumentation(); private Supplier graphqlContext = () -> GraphQLContext.newContext().build(); - private Supplier dataLoaderOptions = () -> DataLoaderOptions.newOptions(); + private Supplier dataLoaderOptions = () -> DataLoaderOptions.newOptions().build(); private Supplier dataLoaderRegistry = () -> { - DataLoaderOptions options = dataLoaderOptions.get().setCachingEnabled(false); + DataLoaderOptions options = DataLoaderOptions + .newOptions(dataLoaderOptions.get()) + .setCachingEnabled(false) + .build(); return BatchLoaderRegistry.newDataLoaderRegistry(options); }; diff --git a/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaToManyDataFetcher.java b/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaToManyDataFetcher.java index fe8c8b11..101e0238 100644 --- a/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaToManyDataFetcher.java +++ b/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaToManyDataFetcher.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.Optional; import org.dataloader.DataLoader; +import org.dataloader.DataLoaderFactory; import org.dataloader.DataLoaderOptions; import org.dataloader.DataLoaderRegistry; import org.dataloader.MappedBatchLoaderWithContext; @@ -84,9 +85,9 @@ protected DataLoader> getDataLoader( queryFactory ); - DataLoaderOptions options = DataLoaderOptions.newOptions().setCachingEnabled(false); + DataLoaderOptions options = DataLoaderOptions.newOptions().setCachingEnabled(false).build(); - DataLoader> dataLoader = DataLoader.newMappedDataLoader( + DataLoader> dataLoader = DataLoaderFactory.newMappedDataLoader( mappedBatchLoader, options ); diff --git a/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaToOneDataFetcher.java b/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaToOneDataFetcher.java index 38e69be5..e21b13ec 100644 --- a/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaToOneDataFetcher.java +++ b/schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaToOneDataFetcher.java @@ -26,6 +26,7 @@ import jakarta.persistence.metamodel.SingularAttribute; import java.util.Optional; import org.dataloader.DataLoader; +import org.dataloader.DataLoaderFactory; import org.dataloader.DataLoaderOptions; import org.dataloader.DataLoaderRegistry; import org.dataloader.MappedBatchLoaderWithContext; @@ -81,9 +82,12 @@ protected DataLoader getDataLoader(DataFetchingEnvironment envir queryFactory ); - DataLoaderOptions options = DataLoaderOptions.newOptions().setCachingEnabled(false); + DataLoaderOptions options = DataLoaderOptions.newOptions().setCachingEnabled(false).build(); - DataLoader dataLoader = DataLoader.newMappedDataLoader(mappedBatchLoader, options); + DataLoader dataLoader = DataLoaderFactory.newMappedDataLoader( + mappedBatchLoader, + options + ); dataLoaderRegistry.register(dataLoaderKey, dataLoader); } } diff --git a/tests/gatling/pom.xml b/tests/gatling/pom.xml index d88e49c7..f4174fdd 100644 --- a/tests/gatling/pom.xml +++ b/tests/gatling/pom.xml @@ -12,7 +12,7 @@ 21 - 8.7.0 + 8.8.0-alpha.120 3.11.5 4.9.6 6.5.3.Final diff --git a/tests/gatling/src/main/resources/data.sql b/tests/gatling/src/main/resources/data.sql index 9672cb6e..8de49ac5 100644 --- a/tests/gatling/src/main/resources/data.sql +++ b/tests/gatling/src/main/resources/data.sql @@ -1006,29 +1006,29 @@ insert into TASK (id, assignee, created_date, description, due_date, last_modifi (999, 'drembrantrq', '2020-01-04T05:06:42Z', 'Organized holistic methodology', '2019-09-01T05:23:48Z', '2019-05-04T17:52:43Z', '2019-04-20T11:34:28Z', '2019-05-04T22:15:09Z', 'Voyatouch', 1, '45665a22-b353-4e6e-a9b8-e92a901473d7', 2, 'CREATED', 'dmcilroyrq', '2019-08-10T17:07:51Z'), (1000, 'jlambarthrr', '2019-07-23T04:10:06Z', 'Intuitive full-range encoding', '2019-09-06T07:44:38Z', '2019-04-06T05:15:02Z', '2019-10-26T08:08:17Z', '2019-05-08T08:59:28Z', 'Fintone', 67, '13a93fb0-895e-4e5d-9a38-aafded574cd8', 2, 'ASSIGNED', 'lhobdenrr', '2019-04-23T12:34:42Z'); -insert into PROCESS_VARIABLE (create_time, execution_id, last_updated_time, name, process_instance_id, type, value) values - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'approverlist', 0, 'json', '{"value":["andrelaksmana"]}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'moduleid', 0, 'string', '{"value":"LBU"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'nullable', 0, 'string', '{"value":null}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationDate', 0, 'string', '{"value":"2023-10-22T00:00:00.000+0000"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationId', 0, 'string', '{"value":"232951752337576"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'isApproved', 0, 'boolean', '{"value":true}'); +insert into PROCESS_VARIABLE (create_time, execution_id, last_updated_time, name, process_instance_id, type, value, ephemeral) values + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'approverlist', 0, 'json', '{"value":["andrelaksmana"]}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'moduleid', 0, 'string', '{"value":"LBU"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'nullable', 0, 'string', '{"value":null}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationDate', 0, 'string', '{"value":"2023-10-22T00:00:00.000+0000"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationId', 0, 'string', '{"value":"232951752337576"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'isApproved', 0, 'boolean', '{"value":true}', false); -insert into PROCESS_VARIABLE (create_time, execution_id, last_updated_time, name, process_instance_id, type, value) values - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'approverlist', 1, 'json', '{"value":["andrelaksmana"]}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'moduleid', 1, 'string', '{"value":"LBU"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'nullable', 1, 'string', '{"value":null}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationDate', 1, 'string', '{"value":"2023-10-22T00:00:00.000+0000"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationId', 1, 'string', '{"value":"232951752337576"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'isApproved', 1, 'boolean', '{"value":true}'); +insert into PROCESS_VARIABLE (create_time, execution_id, last_updated_time, name, process_instance_id, type, value, ephemeral) values + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'approverlist', 1, 'json', '{"value":["andrelaksmana"]}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'moduleid', 1, 'string', '{"value":"LBU"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'nullable', 1, 'string', '{"value":null}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationDate', 1, 'string', '{"value":"2023-10-22T00:00:00.000+0000"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationId', 1, 'string', '{"value":"232951752337576"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'isApproved', 1, 'boolean', '{"value":true}', false); -insert into PROCESS_VARIABLE (create_time, execution_id, last_updated_time, name, process_instance_id, type, value) values - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'approverlist', 2, 'json', '{"value":["andrelaksmana"]}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'moduleid', 2, 'string', '{"value":"LBU"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'nullable', 2, 'string', '{"value":null}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationDate', 2, 'string', '{"value":"2023-10-22T00:00:00.000+0000"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationId', 2, 'string', '{"value":"232951752337576"}'), - (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'isApproved', 2, 'boolean', '{"value":true}'); +insert into PROCESS_VARIABLE (create_time, execution_id, last_updated_time, name, process_instance_id, type, value, ephemeral) values + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'approverlist', 2, 'json', '{"value":["andrelaksmana"]}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'moduleid', 2, 'string', '{"value":"LBU"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'nullable', 2, 'string', '{"value":null}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationDate', 2, 'string', '{"value":"2023-10-22T00:00:00.000+0000"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'applicationId', 2, 'string', '{"value":"232951752337576"}', false), + (CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'isApproved', 2, 'boolean', '{"value":true}', false); insert into TASK_VARIABLE (id, create_time, execution_id, last_updated_time, name, process_instance_id, task_id, type, value) values (1, CURRENT_TIMESTAMP, 'execution_id', CURRENT_TIMESTAMP, 'accountNumber', 0, '1', 'string', '{"value":"data"}'),