From 76cd6d3f2a103fa658f8245ffc6bfb6f16311702 Mon Sep 17 00:00:00 2001 From: Marek Skacelik Date: Wed, 2 Oct 2024 10:13:42 +0200 Subject: [PATCH] added optimalization for dynamic client via service loading of Factory Classes --- .../graphql/client/core/Argument.java | 10 +++--- .../graphql/client/core/Directive.java | 8 +++-- .../client/core/DirectiveArgument.java | 6 ++-- .../graphql/client/core/Document.java | 6 ++-- .../io/smallrye/graphql/client/core/Enum.java | 6 ++-- .../smallrye/graphql/client/core/Field.java | 20 ++++++----- .../graphql/client/core/Fragment.java | 6 ++-- .../client/core/FragmentReference.java | 12 ++++--- .../graphql/client/core/InlineFragment.java | 8 +++-- .../graphql/client/core/InputObject.java | 6 ++-- .../graphql/client/core/InputObjectField.java | 8 +++-- .../graphql/client/core/Operation.java | 36 ++++++++++--------- .../graphql/client/core/Variable.java | 28 ++++++++------- .../graphql/client/core/VariableType.java | 18 +++++----- .../client/core/factory/ArgumentFactory.java | 8 +++++ .../factory/DirectiveArgumentFactory.java | 8 +++++ .../client/core/factory/DirectiveFactory.java | 8 +++++ .../client/core/factory/DocumentFactory.java | 8 +++++ .../client/core/factory/EnumFactory.java | 8 +++++ .../client/core/factory/FieldFactory.java | 8 +++++ .../client/core/factory/FragmentFactory.java | 8 +++++ .../factory/FragmentReferenceFactory.java | 8 +++++ .../core/factory/InlineFragmentFactory.java | 8 +++++ .../core/factory/InputObjectFactory.java | 8 +++++ .../core/factory/InputObjectFieldFactory.java | 8 +++++ .../client/core/factory/OperationFactory.java | 8 +++++ .../client/core/factory/VariableFactory.java | 8 +++++ .../core/factory/VariableTypeFactory.java | 8 +++++ .../client/core/utils/ServiceUtils.java | 17 ++++++--- .../core/factory/ArgumentFactoryImpl.java | 13 +++++++ .../factory/DirectiveArgumentFactoryImpl.java | 13 +++++++ .../core/factory/DirectiveFactoryImpl.java | 13 +++++++ .../core/factory/DocumentFactoryImpl.java | 13 +++++++ .../impl/core/factory/EnumFactoryImpl.java | 13 +++++++ .../impl/core/factory/FieldFactoryImpl.java | 13 +++++++ .../core/factory/FragmentFactoryImpl.java | 13 +++++++ .../factory/FragmentReferenceFactoryImpl.java | 13 +++++++ .../factory/InlineFragmentFactoryImpl.java | 13 +++++++ .../core/factory/InputObjectFactoryImpl.java | 13 +++++++ .../factory/InputObjectFieldFactoryImpl.java | 13 +++++++ .../core/factory/OperationFactoryImpl.java | 13 +++++++ .../core/factory/VariableFactoryImpl.java | 13 +++++++ .../core/factory/VariableTypeFactoryImpl.java | 13 +++++++ .../io.smallrye.graphql.client.core.Argument | 1 - .../io.smallrye.graphql.client.core.Directive | 1 - ...lrye.graphql.client.core.DirectiveArgument | 1 - .../io.smallrye.graphql.client.core.Document | 1 - .../io.smallrye.graphql.client.core.Enum | 1 - .../io.smallrye.graphql.client.core.Field | 1 - .../io.smallrye.graphql.client.core.Fragment | 1 - ...lrye.graphql.client.core.FragmentReference | 1 - ...mallrye.graphql.client.core.InlineFragment | 1 - ...o.smallrye.graphql.client.core.InputObject | 1 - ...llrye.graphql.client.core.InputObjectField | 1 - .../io.smallrye.graphql.client.core.Operation | 1 - .../io.smallrye.graphql.client.core.Variable | 1 - ....smallrye.graphql.client.core.VariableType | 1 - ...raphql.client.core.factory.ArgumentFactory | 1 + ...ient.core.factory.DirectiveArgumentFactory | 1 + ...aphql.client.core.factory.DirectiveFactory | 1 + ...raphql.client.core.factory.DocumentFactory | 1 + ...ye.graphql.client.core.factory.EnumFactory | 1 + ...e.graphql.client.core.factory.FieldFactory | 1 + ...raphql.client.core.factory.FragmentFactory | 1 + ...ient.core.factory.FragmentReferenceFactory | 1 + ....client.core.factory.InlineFragmentFactory | 1 + ...hql.client.core.factory.InputObjectFactory | 1 + ...lient.core.factory.InputObjectFieldFactory | 1 + ...aphql.client.core.factory.OperationFactory | 1 + ...raphql.client.core.factory.VariableFactory | 1 + ...ql.client.core.factory.VariableTypeFactory | 1 + 71 files changed, 423 insertions(+), 94 deletions(-) create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/ArgumentFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/DirectiveArgumentFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/DirectiveFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/DocumentFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/EnumFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/FieldFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/FragmentFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/FragmentReferenceFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/InlineFragmentFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/InputObjectFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/InputObjectFieldFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/OperationFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/VariableFactory.java create mode 100644 client/api/src/main/java/io/smallrye/graphql/client/core/factory/VariableTypeFactory.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/ArgumentFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DirectiveArgumentFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DirectiveFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DocumentFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/EnumFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FieldFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FragmentFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FragmentReferenceFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InlineFragmentFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InputObjectFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InputObjectFieldFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/OperationFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/VariableFactoryImpl.java create mode 100644 client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/VariableTypeFactoryImpl.java delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Argument delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Directive delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.DirectiveArgument delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Document delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Enum delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Field delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Fragment delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.FragmentReference delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InlineFragment delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InputObject delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InputObjectField delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Operation delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Variable delete mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.VariableType create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.ArgumentFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DirectiveArgumentFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DirectiveFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DocumentFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.EnumFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FieldFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FragmentFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FragmentReferenceFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InlineFragmentFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InputObjectFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InputObjectFieldFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.OperationFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.VariableFactory create mode 100644 client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.VariableTypeFactory diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/Argument.java b/client/api/src/main/java/io/smallrye/graphql/client/core/Argument.java index 8ebb1d54b..7961474cf 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/Argument.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/Argument.java @@ -1,10 +1,12 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import java.util.List; +import io.smallrye.graphql.client.core.factory.ArgumentFactory; + public interface Argument extends Buildable { /* * Static factory methods @@ -15,7 +17,7 @@ static List args(Argument... args) { // (name, raw value) static Argument arg(String name, Object value) { - Argument argument = getNewInstanceOf(Argument.class); + Argument argument = getNewInstanceFromFactory(ArgumentFactory.class); argument.setName(name); argument.setValue(value); @@ -25,7 +27,7 @@ static Argument arg(String name, Object value) { // (name, inputObject) static Argument arg(String name, InputObject inputObject) { - Argument argument = getNewInstanceOf(Argument.class); + Argument argument = getNewInstanceFromFactory(ArgumentFactory.class); argument.setName(name); argument.setValue(inputObject); @@ -35,7 +37,7 @@ static Argument arg(String name, InputObject inputObject) { // (name, variable) static Argument arg(String name, Variable var) { - Argument argument = getNewInstanceOf(Argument.class); + Argument argument = getNewInstanceFromFactory(ArgumentFactory.class); argument.setName(name); argument.setValue(var); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/Directive.java b/client/api/src/main/java/io/smallrye/graphql/client/core/Directive.java index a7cc46544..7419bfb95 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/Directive.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/Directive.java @@ -1,18 +1,20 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import java.util.List; +import io.smallrye.graphql.client.core.factory.DirectiveFactory; + public interface Directive extends Buildable { static List directives(Directive... directives) { return asList(directives); } static Directive directive(String name) { - Directive directive = getNewInstanceOf(Directive.class); + Directive directive = getNewInstanceFromFactory(DirectiveFactory.class); directive.setName(name); directive.setDirectiveArguments(emptyList()); @@ -21,7 +23,7 @@ static Directive directive(String name) { } static Directive directive(String name, DirectiveArgument... directiveArguments) { - Directive directive = getNewInstanceOf(Directive.class); + Directive directive = getNewInstanceFromFactory(DirectiveFactory.class); directive.setName(name); directive.setDirectiveArguments(asList(directiveArguments)); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/DirectiveArgument.java b/client/api/src/main/java/io/smallrye/graphql/client/core/DirectiveArgument.java index 6a5209c5e..6cf16c007 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/DirectiveArgument.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/DirectiveArgument.java @@ -1,17 +1,19 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import java.util.List; +import io.smallrye.graphql.client.core.factory.DirectiveArgumentFactory; + public interface DirectiveArgument extends Buildable { static List directiveArgs(DirectiveArgument... directiveArgs) { return asList(directiveArgs); } static DirectiveArgument directiveArg(String name, Object value) { - DirectiveArgument directiveArgument = getNewInstanceOf(DirectiveArgument.class); + DirectiveArgument directiveArgument = getNewInstanceFromFactory(DirectiveArgumentFactory.class); directiveArgument.setName(name); directiveArgument.setValue(value); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/Document.java b/client/api/src/main/java/io/smallrye/graphql/client/core/Document.java index 835a04907..8a4956d21 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/Document.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/Document.java @@ -1,17 +1,19 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import java.util.List; +import io.smallrye.graphql.client.core.factory.DocumentFactory; + public interface Document extends Buildable { /* * Static factory methods */ static Document document(FragmentOrOperation... operations) { - Document document = getNewInstanceOf(Document.class); + Document document = getNewInstanceFromFactory(DocumentFactory.class); document.setOperations(asList(operations)); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/Enum.java b/client/api/src/main/java/io/smallrye/graphql/client/core/Enum.java index bad50abef..22501f02f 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/Enum.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/Enum.java @@ -1,13 +1,15 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; + +import io.smallrye.graphql.client.core.factory.EnumFactory; public interface Enum extends Buildable { /* * Static factory methods */ static Enum gqlEnum(String value) { - Enum gqlEnum = getNewInstanceOf(Enum.class); + Enum gqlEnum = getNewInstanceFromFactory(EnumFactory.class); gqlEnum.setValue(value); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/Field.java b/client/api/src/main/java/io/smallrye/graphql/client/core/Field.java index f6680e92f..50b3c17a7 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/Field.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/Field.java @@ -1,11 +1,13 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import java.util.List; +import io.smallrye.graphql.client.core.factory.FieldFactory; + public interface Field extends FieldOrFragment { /* * Static factory methods @@ -16,7 +18,7 @@ static List fields(FieldOrFragment... fields) { // (name) static Field field(String name) { - Field field = getNewInstanceOf(Field.class); + Field field = getNewInstanceFromFactory(FieldFactory.class); field.setName(name); field.setArguments(emptyList()); @@ -28,7 +30,7 @@ static Field field(String name) { // (name, subfields) static Field field(String name, FieldOrFragment... fields) { - Field field = getNewInstanceOf(Field.class); + Field field = getNewInstanceFromFactory(FieldFactory.class); field.setName(name); field.setArguments(emptyList()); @@ -40,7 +42,7 @@ static Field field(String name, FieldOrFragment... fields) { // (name, args) static Field field(String name, Argument... args) { - Field field = getNewInstanceOf(Field.class); + Field field = getNewInstanceFromFactory(FieldFactory.class); field.setName(name); field.setArguments(asList(args)); @@ -52,7 +54,7 @@ static Field field(String name, Argument... args) { // (name, directives) static Field fieldWithDirectives(String name, Directive... directives) { - Field field = getNewInstanceOf(Field.class); + Field field = getNewInstanceFromFactory(FieldFactory.class); field.setName(name); field.setArguments(emptyList()); @@ -64,7 +66,7 @@ static Field fieldWithDirectives(String name, Directive... directives) { // (name, args, subfields) static Field field(String name, List args, FieldOrFragment... fields) { - Field field = getNewInstanceOf(Field.class); + Field field = getNewInstanceFromFactory(FieldFactory.class); field.setName(name); field.setArguments(args); @@ -76,7 +78,7 @@ static Field field(String name, List args, FieldOrFragment... fields) // (name, args, directives) static Field fieldWithDirectives(String name, List args, List directives) { - Field field = getNewInstanceOf(Field.class); + Field field = getNewInstanceFromFactory(FieldFactory.class); field.setName(name); field.setArguments(args); @@ -88,7 +90,7 @@ static Field fieldWithDirectives(String name, List args, List directives, FieldOrFragment... fields) { - Field field = getNewInstanceOf(Field.class); + Field field = getNewInstanceFromFactory(FieldFactory.class); field.setName(name); field.setArguments(emptyList()); @@ -100,7 +102,7 @@ static Field fieldWithDirectives(String name, List directives, FieldO // (name, args, directives, subfields) static Field fieldWithDirectives(String name, List args, List directives, FieldOrFragment... fields) { - Field field = getNewInstanceOf(Field.class); + Field field = getNewInstanceFromFactory(FieldFactory.class); field.setName(name); field.setArguments(args); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/Fragment.java b/client/api/src/main/java/io/smallrye/graphql/client/core/Fragment.java index d6cee8f04..cace14c1c 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/Fragment.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/Fragment.java @@ -1,6 +1,6 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static io.smallrye.graphql.client.core.utils.validation.NameValidation.validateFragmentName; import static io.smallrye.graphql.client.core.utils.validation.NameValidation.validateName; import static java.util.Arrays.asList; @@ -8,6 +8,8 @@ import java.util.List; +import io.smallrye.graphql.client.core.factory.FragmentFactory; + /** * Represents a named fragment definition in a GraphQL document. Such definition consists of a name, * target type, and a set of fields. @@ -72,7 +74,7 @@ public Fragment on(String targetType, List directives, FieldOrFragmen } Fragment build() { - Fragment fragment = getNewInstanceOf(Fragment.class); + Fragment fragment = getNewInstanceFromFactory(FragmentFactory.class); fragment.setName(name); fragment.setTargetType(targetType); fragment.setDirectives(directives); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/FragmentReference.java b/client/api/src/main/java/io/smallrye/graphql/client/core/FragmentReference.java index f697c0dd3..9985f1202 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/FragmentReference.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/FragmentReference.java @@ -1,11 +1,13 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import java.util.List; +import io.smallrye.graphql.client.core.factory.FragmentReferenceFactory; + /** * Represents a reference to a named fragment. */ @@ -16,7 +18,7 @@ public interface FragmentReference extends FieldOrFragment { * In the resulting document, this will appear as `...FRAGMENTNAME` */ static FragmentReference fragmentRef(String name) { - FragmentReference ref = getNewInstanceOf(FragmentReference.class); + FragmentReference ref = getNewInstanceFromFactory(FragmentReferenceFactory.class); ref.setName(name); ref.setDirectives(emptyList()); return ref; @@ -28,7 +30,7 @@ static FragmentReference fragmentRef(String name) { * this will appear as `...FRAGMENTNAME` */ static FragmentReference fragmentRef(Fragment fragment) { - FragmentReference ref = getNewInstanceOf(FragmentReference.class); + FragmentReference ref = getNewInstanceFromFactory(FragmentReferenceFactory.class); ref.setName(fragment.getName()); ref.setDirectives(emptyList()); return ref; @@ -39,7 +41,7 @@ static FragmentReference fragmentRef(Fragment fragment) { * In the resulting document, this will appear as `...FRAGMENTNAME @DIRECTIVE` */ static FragmentReference fragmentRefWithDirective(String name, Directive... directives) { - FragmentReference ref = getNewInstanceOf(FragmentReference.class); + FragmentReference ref = getNewInstanceFromFactory(FragmentReferenceFactory.class); ref.setName(name); ref.setDirectives(asList(directives)); return ref; @@ -51,7 +53,7 @@ static FragmentReference fragmentRefWithDirective(String name, Directive... dire * this will appear as `...FRAGMENTNAME @DIRECTIVE` */ static FragmentReference fragmentRefWithDirective(Fragment fragment, Directive... directives) { - FragmentReference ref = getNewInstanceOf(FragmentReference.class); + FragmentReference ref = getNewInstanceFromFactory(FragmentReferenceFactory.class); ref.setName(fragment.getName()); ref.setDirectives(asList(directives)); return ref; diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/InlineFragment.java b/client/api/src/main/java/io/smallrye/graphql/client/core/InlineFragment.java index 877a6766a..d2fa0d5a5 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/InlineFragment.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/InlineFragment.java @@ -1,11 +1,13 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import java.util.List; +import io.smallrye.graphql.client.core.factory.InlineFragmentFactory; + /** * Represents an inline fragment in a GraphQL document. This can be used * anywhere where a field is expected (thus it implements `FieldOrFragment`). @@ -13,7 +15,7 @@ public interface InlineFragment extends FieldOrFragment { static InlineFragment on(String type, FieldOrFragment... fields) { - InlineFragment fragment = getNewInstanceOf(InlineFragment.class); + InlineFragment fragment = getNewInstanceFromFactory(InlineFragmentFactory.class); fragment.setType(type); fragment.setDirectives(emptyList()); @@ -23,7 +25,7 @@ static InlineFragment on(String type, FieldOrFragment... fields) { } static InlineFragment on(String type, List directives, FieldOrFragment... fields) { - InlineFragment fragment = getNewInstanceOf(InlineFragment.class); + InlineFragment fragment = getNewInstanceFromFactory(InlineFragmentFactory.class); fragment.setType(type); fragment.setDirectives(directives); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/InputObject.java b/client/api/src/main/java/io/smallrye/graphql/client/core/InputObject.java index deb62ffa6..c44fbd498 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/InputObject.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/InputObject.java @@ -1,16 +1,18 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import java.util.List; +import io.smallrye.graphql.client.core.factory.InputObjectFactory; + public interface InputObject extends Buildable { /* * Static factory methods */ static InputObject inputObject(InputObjectField... inputObjectFields) { - InputObject inputObject = getNewInstanceOf(InputObject.class); + InputObject inputObject = getNewInstanceFromFactory(InputObjectFactory.class); inputObject.setInputObjectFields(asList(inputObjectFields)); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/InputObjectField.java b/client/api/src/main/java/io/smallrye/graphql/client/core/InputObjectField.java index 9531ff060..08db5955e 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/InputObjectField.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/InputObjectField.java @@ -1,6 +1,8 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; + +import io.smallrye.graphql.client.core.factory.InputObjectFieldFactory; public interface InputObjectField extends Buildable { @@ -9,7 +11,7 @@ public interface InputObjectField extends Buildable { */ // (name, value) static InputObjectField prop(String name, Object value) { - InputObjectField inputObjectField = getNewInstanceOf(InputObjectField.class); + InputObjectField inputObjectField = getNewInstanceFromFactory(InputObjectFieldFactory.class); inputObjectField.setName(name); inputObjectField.setValue(value); @@ -19,7 +21,7 @@ static InputObjectField prop(String name, Object value) { // (name, variable) static InputObjectField prop(String name, Variable var) { - InputObjectField inputObjectField = getNewInstanceOf(InputObjectField.class); + InputObjectField inputObjectField = getNewInstanceFromFactory(InputObjectFieldFactory.class); inputObjectField.setName(name); inputObjectField.setValue(var); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/Operation.java b/client/api/src/main/java/io/smallrye/graphql/client/core/Operation.java index 92d1a32ef..b8fe1153d 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/Operation.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/Operation.java @@ -1,12 +1,14 @@ package io.smallrye.graphql.client.core; import static io.smallrye.graphql.client.core.OperationType.QUERY; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import java.util.List; +import io.smallrye.graphql.client.core.factory.OperationFactory; + public interface Operation extends FragmentOrOperation { /* * Helpers @@ -17,7 +19,7 @@ static List operations(Operation... operations) { // (fields) static Operation operation(FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(QUERY); operation.setName(""); @@ -30,7 +32,7 @@ static Operation operation(FieldOrFragment... fields) { // (directives, fields) static Operation operationWithDirectives(List directives, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(QUERY); operation.setName(""); @@ -43,7 +45,7 @@ static Operation operationWithDirectives(List directives, FieldOrFrag // (vars, fields) static Operation operation(List vars, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(QUERY); operation.setName(""); @@ -56,7 +58,7 @@ static Operation operation(List vars, FieldOrFragment... fields) { // (vars, directives, fields) static Operation operationWithDirectives(List vars, List directives, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(QUERY); operation.setName(""); @@ -69,7 +71,7 @@ static Operation operationWithDirectives(List vars, List di // (type, fields) static Operation operation(OperationType type, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(type); operation.setName(""); @@ -84,7 +86,7 @@ static Operation operation(OperationType type, FieldOrFragment... fields) { static Operation operationWithDirectives(OperationType type, List directives, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(type); operation.setName(""); @@ -97,7 +99,7 @@ static Operation operationWithDirectives(OperationType type, // (type, vars, fields) static Operation operation(OperationType type, List vars, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(type); operation.setName(""); @@ -113,7 +115,7 @@ static Operation operationWithDirectives(OperationType type, List vars, List directives, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(type); operation.setName(""); @@ -126,7 +128,7 @@ static Operation operationWithDirectives(OperationType type, // (name, fields) static Operation operation(String name, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(QUERY); operation.setName(name); @@ -139,7 +141,7 @@ static Operation operation(String name, FieldOrFragment... fields) { // (name, directives, fields) static Operation operationWithDirectives(String name, List directives, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(QUERY); operation.setName(name); @@ -152,7 +154,7 @@ static Operation operationWithDirectives(String name, List directives // (type, name, fields) static Operation operation(OperationType type, String name, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(type); operation.setName(name); @@ -168,7 +170,7 @@ static Operation operationWithDirectives(OperationType type, String name, List directives, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(type); operation.setName(name); @@ -181,7 +183,7 @@ static Operation operationWithDirectives(OperationType type, // (name, vars, fields) static Operation operation(String name, List vars, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(QUERY); operation.setName(name); @@ -197,7 +199,7 @@ static Operation operationWithDirectives(String name, List vars, List directives, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(QUERY); operation.setName(name); @@ -210,7 +212,7 @@ static Operation operationWithDirectives(String name, // (type, name, vars, fields) static Operation operation(OperationType type, String name, List vars, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(type); operation.setName(name); @@ -227,7 +229,7 @@ static Operation operationWithDirectives(OperationType type, List vars, List directives, FieldOrFragment... fields) { - Operation operation = getNewInstanceOf(Operation.class); + Operation operation = getNewInstanceFromFactory(OperationFactory.class); operation.setType(type); operation.setName(name); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/Variable.java b/client/api/src/main/java/io/smallrye/graphql/client/core/Variable.java index d9c17eb0a..23403e23e 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/Variable.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/Variable.java @@ -1,13 +1,15 @@ package io.smallrye.graphql.client.core; import static io.smallrye.graphql.client.core.VariableType.varType; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import java.util.List; import java.util.Optional; +import io.smallrye.graphql.client.core.factory.VariableFactory; + public interface Variable extends Buildable { /* * Helpers @@ -18,7 +20,7 @@ static List vars(Variable... vars) { // (name, scalarType) static Variable var(String name, ScalarType scalarType) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType(scalarType)); @@ -30,7 +32,7 @@ static Variable var(String name, ScalarType scalarType) { // (name, scalarType, directives) static Variable varWithDirectives(String name, ScalarType scalarType, List directives) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType(scalarType)); @@ -42,7 +44,7 @@ static Variable varWithDirectives(String name, ScalarType scalarType, List directives) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType(scalarType)); @@ -69,7 +71,7 @@ static Variable varWithDirectives(String name, // (name, objectType) static Variable var(String name, String objectTypeName) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType(objectTypeName)); @@ -81,7 +83,7 @@ static Variable var(String name, String objectTypeName) { // (name, objectType, directives) static Variable varWithDirectives(String name, String objectTypeName, List directives) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType(objectTypeName)); @@ -93,7 +95,7 @@ static Variable varWithDirectives(String name, String objectTypeName, List directives) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType(objectTypeName)); @@ -117,7 +119,7 @@ static Variable varWithDirectives(String name, String objectTypeName, Object def // (name, variableType) static Variable var(String name, VariableType varType) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType); @@ -129,7 +131,7 @@ static Variable var(String name, VariableType varType) { // (name, variableType, directives) static Variable varWithDirectives(String name, VariableType varType, List directives) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType); @@ -141,7 +143,7 @@ static Variable varWithDirectives(String name, VariableType varType, List directives) { - Variable var = getNewInstanceOf(Variable.class); + Variable var = getNewInstanceFromFactory(VariableFactory.class); var.setName(name); var.setType(varType); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/VariableType.java b/client/api/src/main/java/io/smallrye/graphql/client/core/VariableType.java index 413b15333..05d850287 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/VariableType.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/VariableType.java @@ -1,8 +1,10 @@ package io.smallrye.graphql.client.core; -import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf; +import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceFromFactory; import static io.smallrye.graphql.client.core.utils.validation.NameValidation.validateName; +import io.smallrye.graphql.client.core.factory.VariableTypeFactory; + public interface VariableType extends Buildable { /* @@ -10,7 +12,7 @@ public interface VariableType extends Buildable { */ // (objectTypeName) static VariableType varType(String objectTypeName) { - VariableType varType = getNewInstanceOf(VariableType.class); + VariableType varType = getNewInstanceFromFactory(VariableTypeFactory.class); varType.setName(validateName(objectTypeName)); varType.setNonNull(false); @@ -21,7 +23,7 @@ static VariableType varType(String objectTypeName) { // (scalarType) static VariableType varType(ScalarType scalarType) { - VariableType varType = getNewInstanceOf(VariableType.class); + VariableType varType = getNewInstanceFromFactory(VariableTypeFactory.class); varType.setName(scalarType.toString()); varType.setNonNull(false); @@ -32,7 +34,7 @@ static VariableType varType(ScalarType scalarType) { // nonNull(scalarType) static VariableType nonNull(ScalarType scalarType) { - VariableType varType = getNewInstanceOf(VariableType.class); + VariableType varType = getNewInstanceFromFactory(VariableTypeFactory.class); varType.setName(scalarType.toString()); varType.setNonNull(true); @@ -43,7 +45,7 @@ static VariableType nonNull(ScalarType scalarType) { // nonNull(objectTypeName) static VariableType nonNull(String objectTypeName) { - VariableType varType = getNewInstanceOf(VariableType.class); + VariableType varType = getNewInstanceFromFactory(VariableTypeFactory.class); varType.setName(validateName(objectTypeName)); varType.setNonNull(true); @@ -60,7 +62,7 @@ static VariableType nonNull(VariableType varType) { // list(scalarType) static VariableType list(ScalarType scalarType) { - VariableType varType = getNewInstanceOf(VariableType.class); + VariableType varType = getNewInstanceFromFactory(VariableTypeFactory.class); varType.setName("list(" + scalarType.toString() + ")"); varType.setNonNull(false); @@ -71,7 +73,7 @@ static VariableType list(ScalarType scalarType) { // list(typeName) static VariableType list(String objectTypeName) { - VariableType varType = getNewInstanceOf(VariableType.class); + VariableType varType = getNewInstanceFromFactory(VariableTypeFactory.class); varType.setName("list(" + validateName(objectTypeName) + ")"); varType.setNonNull(false); @@ -82,7 +84,7 @@ static VariableType list(String objectTypeName) { // list(variableType) static VariableType list(VariableType childVarType) { - VariableType varType = getNewInstanceOf(VariableType.class); + VariableType varType = getNewInstanceFromFactory(VariableTypeFactory.class); varType.setName("list(" + childVarType.getName() + ")"); varType.setNonNull(false); diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/ArgumentFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/ArgumentFactory.java new file mode 100644 index 000000000..c4c1af4f4 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/ArgumentFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.Argument; + +public interface ArgumentFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DirectiveArgumentFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DirectiveArgumentFactory.java new file mode 100644 index 000000000..6fb8492c8 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DirectiveArgumentFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.DirectiveArgument; + +public interface DirectiveArgumentFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DirectiveFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DirectiveFactory.java new file mode 100644 index 000000000..528b4d6ff --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DirectiveFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.Directive; + +public interface DirectiveFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DocumentFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DocumentFactory.java new file mode 100644 index 000000000..2b0730299 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/DocumentFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.Document; + +public interface DocumentFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/EnumFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/EnumFactory.java new file mode 100644 index 000000000..94151b782 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/EnumFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.Enum; + +public interface EnumFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FieldFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FieldFactory.java new file mode 100644 index 000000000..245b802a9 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FieldFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.Field; + +public interface FieldFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FragmentFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FragmentFactory.java new file mode 100644 index 000000000..26567874a --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FragmentFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.Fragment; + +public interface FragmentFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FragmentReferenceFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FragmentReferenceFactory.java new file mode 100644 index 000000000..fc75c9379 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/FragmentReferenceFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.FragmentReference; + +public interface FragmentReferenceFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InlineFragmentFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InlineFragmentFactory.java new file mode 100644 index 000000000..d986f7764 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InlineFragmentFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.InlineFragment; + +public interface InlineFragmentFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InputObjectFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InputObjectFactory.java new file mode 100644 index 000000000..2de19428e --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InputObjectFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.InputObject; + +public interface InputObjectFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InputObjectFieldFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InputObjectFieldFactory.java new file mode 100644 index 000000000..e80737db9 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/InputObjectFieldFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.InputObjectField; + +public interface InputObjectFieldFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/OperationFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/OperationFactory.java new file mode 100644 index 000000000..7c262bfa9 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/OperationFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.Operation; + +public interface OperationFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/VariableFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/VariableFactory.java new file mode 100644 index 000000000..f64acfc32 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/VariableFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.Variable; + +public interface VariableFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/factory/VariableTypeFactory.java b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/VariableTypeFactory.java new file mode 100644 index 000000000..f677aa286 --- /dev/null +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/factory/VariableTypeFactory.java @@ -0,0 +1,8 @@ +package io.smallrye.graphql.client.core.factory; + +import java.util.function.Supplier; + +import io.smallrye.graphql.client.core.VariableType; + +public interface VariableTypeFactory extends Supplier { +} diff --git a/client/api/src/main/java/io/smallrye/graphql/client/core/utils/ServiceUtils.java b/client/api/src/main/java/io/smallrye/graphql/client/core/utils/ServiceUtils.java index faab29d9a..dff1b9846 100644 --- a/client/api/src/main/java/io/smallrye/graphql/client/core/utils/ServiceUtils.java +++ b/client/api/src/main/java/io/smallrye/graphql/client/core/utils/ServiceUtils.java @@ -1,14 +1,21 @@ package io.smallrye.graphql.client.core.utils; +import java.util.Map; import java.util.ServiceLoader; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Supplier; public class ServiceUtils { - // TODO: check if 0 or >1 instance found. Throw exception if either. - public static T getNewInstanceOf(Class clazz) { - ServiceLoader sl = ServiceLoader.load(clazz); - T t = sl.iterator().next(); + private final static Map>, ServiceLoader> cacheMemory = new ConcurrentHashMap<>(); - return t; + public static T getNewInstanceFromFactory(Class> clazz) { + var sl = (ServiceLoader>) cacheMemory.computeIfAbsent(clazz, + ServiceLoader::load); + if (sl.stream().count() != 1) { + throw new IllegalArgumentException( + String.format("Expected exactly one implementation of %s. Found %d.", clazz.getName(), sl.stream().count())); + } + return sl.iterator().next().get(); } private ServiceUtils() { diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/ArgumentFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/ArgumentFactoryImpl.java new file mode 100644 index 000000000..4cd8bc076 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/ArgumentFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.Argument; +import io.smallrye.graphql.client.core.factory.ArgumentFactory; +import io.smallrye.graphql.client.impl.core.ArgumentImpl; + +public class ArgumentFactoryImpl implements ArgumentFactory { + + @Override + public Argument get() { + return new ArgumentImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DirectiveArgumentFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DirectiveArgumentFactoryImpl.java new file mode 100644 index 000000000..84edd7ea9 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DirectiveArgumentFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.DirectiveArgument; +import io.smallrye.graphql.client.core.factory.DirectiveArgumentFactory; +import io.smallrye.graphql.client.impl.core.DirectiveArgumentImpl; + +public class DirectiveArgumentFactoryImpl implements DirectiveArgumentFactory { + + @Override + public DirectiveArgument get() { + return new DirectiveArgumentImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DirectiveFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DirectiveFactoryImpl.java new file mode 100644 index 000000000..000205059 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DirectiveFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.Directive; +import io.smallrye.graphql.client.core.factory.DirectiveFactory; +import io.smallrye.graphql.client.impl.core.DirectiveImpl; + +public class DirectiveFactoryImpl implements DirectiveFactory { + + @Override + public Directive get() { + return new DirectiveImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DocumentFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DocumentFactoryImpl.java new file mode 100644 index 000000000..6334480c7 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/DocumentFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.Document; +import io.smallrye.graphql.client.core.factory.DocumentFactory; +import io.smallrye.graphql.client.impl.core.DocumentImpl; + +public class DocumentFactoryImpl implements DocumentFactory { + + @Override + public Document get() { + return new DocumentImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/EnumFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/EnumFactoryImpl.java new file mode 100644 index 000000000..9ee897954 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/EnumFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.Enum; +import io.smallrye.graphql.client.core.factory.EnumFactory; +import io.smallrye.graphql.client.impl.core.EnumImpl; + +public class EnumFactoryImpl implements EnumFactory { + + @Override + public Enum get() { + return new EnumImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FieldFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FieldFactoryImpl.java new file mode 100644 index 000000000..c23617ccf --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FieldFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.Field; +import io.smallrye.graphql.client.core.factory.FieldFactory; +import io.smallrye.graphql.client.impl.core.FieldImpl; + +public class FieldFactoryImpl implements FieldFactory { + + @Override + public Field get() { + return new FieldImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FragmentFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FragmentFactoryImpl.java new file mode 100644 index 000000000..fa474f305 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FragmentFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.Fragment; +import io.smallrye.graphql.client.core.factory.FragmentFactory; +import io.smallrye.graphql.client.impl.core.FragmentImpl; + +public class FragmentFactoryImpl implements FragmentFactory { + + @Override + public Fragment get() { + return new FragmentImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FragmentReferenceFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FragmentReferenceFactoryImpl.java new file mode 100644 index 000000000..499ea6dfe --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/FragmentReferenceFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.FragmentReference; +import io.smallrye.graphql.client.core.factory.FragmentReferenceFactory; +import io.smallrye.graphql.client.impl.core.FragmentReferenceImpl; + +public class FragmentReferenceFactoryImpl implements FragmentReferenceFactory { + + @Override + public FragmentReference get() { + return new FragmentReferenceImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InlineFragmentFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InlineFragmentFactoryImpl.java new file mode 100644 index 000000000..7d5fe6f7d --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InlineFragmentFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.InlineFragment; +import io.smallrye.graphql.client.core.factory.InlineFragmentFactory; +import io.smallrye.graphql.client.impl.core.InlineFragmentImpl; + +public class InlineFragmentFactoryImpl implements InlineFragmentFactory { + + @Override + public InlineFragment get() { + return new InlineFragmentImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InputObjectFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InputObjectFactoryImpl.java new file mode 100644 index 000000000..eca0ba558 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InputObjectFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.InputObject; +import io.smallrye.graphql.client.core.factory.InputObjectFactory; +import io.smallrye.graphql.client.impl.core.InputObjectImpl; + +public class InputObjectFactoryImpl implements InputObjectFactory { + + @Override + public InputObject get() { + return new InputObjectImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InputObjectFieldFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InputObjectFieldFactoryImpl.java new file mode 100644 index 000000000..ac5945a76 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/InputObjectFieldFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.InputObjectField; +import io.smallrye.graphql.client.core.factory.InputObjectFieldFactory; +import io.smallrye.graphql.client.impl.core.InputObjectFieldImpl; + +public class InputObjectFieldFactoryImpl implements InputObjectFieldFactory { + + @Override + public InputObjectField get() { + return new InputObjectFieldImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/OperationFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/OperationFactoryImpl.java new file mode 100644 index 000000000..a56e14a64 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/OperationFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.Operation; +import io.smallrye.graphql.client.core.factory.OperationFactory; +import io.smallrye.graphql.client.impl.core.OperationImpl; + +public class OperationFactoryImpl implements OperationFactory { + + @Override + public Operation get() { + return new OperationImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/VariableFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/VariableFactoryImpl.java new file mode 100644 index 000000000..5acf63eba --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/VariableFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.Variable; +import io.smallrye.graphql.client.core.factory.VariableFactory; +import io.smallrye.graphql.client.impl.core.VariableImpl; + +public class VariableFactoryImpl implements VariableFactory { + + @Override + public Variable get() { + return new VariableImpl(); + } +} diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/VariableTypeFactoryImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/VariableTypeFactoryImpl.java new file mode 100644 index 000000000..3614bd7a0 --- /dev/null +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/factory/VariableTypeFactoryImpl.java @@ -0,0 +1,13 @@ +package io.smallrye.graphql.client.impl.core.factory; + +import io.smallrye.graphql.client.core.VariableType; +import io.smallrye.graphql.client.core.factory.VariableTypeFactory; +import io.smallrye.graphql.client.impl.core.VariableTypeImpl; + +public class VariableTypeFactoryImpl implements VariableTypeFactory { + + @Override + public VariableType get() { + return new VariableTypeImpl(); + } +} diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Argument b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Argument deleted file mode 100644 index 3b2ac2b76..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Argument +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.ArgumentImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Directive b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Directive deleted file mode 100644 index 227c07548..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Directive +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.DirectiveImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.DirectiveArgument b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.DirectiveArgument deleted file mode 100644 index d191a27a4..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.DirectiveArgument +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.DirectiveArgumentImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Document b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Document deleted file mode 100644 index 1616a3a47..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Document +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.DocumentImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Enum b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Enum deleted file mode 100644 index 670a68159..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Enum +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.EnumImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Field b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Field deleted file mode 100644 index f6b33c21c..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Field +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.FieldImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Fragment b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Fragment deleted file mode 100644 index d7da6cfff..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Fragment +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.FragmentImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.FragmentReference b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.FragmentReference deleted file mode 100644 index dff259488..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.FragmentReference +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.FragmentReferenceImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InlineFragment b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InlineFragment deleted file mode 100644 index 24e9bb598..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InlineFragment +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.InlineFragmentImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InputObject b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InputObject deleted file mode 100644 index c818982f2..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InputObject +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.InputObjectImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InputObjectField b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InputObjectField deleted file mode 100644 index 37ec72a4e..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.InputObjectField +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.InputObjectFieldImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Operation b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Operation deleted file mode 100644 index 46e92eb16..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Operation +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.OperationImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Variable b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Variable deleted file mode 100644 index b68a03d0e..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.Variable +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.VariableImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.VariableType b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.VariableType deleted file mode 100644 index 5e3e2733b..000000000 --- a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.VariableType +++ /dev/null @@ -1 +0,0 @@ -io.smallrye.graphql.client.impl.core.VariableTypeImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.ArgumentFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.ArgumentFactory new file mode 100644 index 000000000..be9f7dfe7 --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.ArgumentFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.ArgumentFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DirectiveArgumentFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DirectiveArgumentFactory new file mode 100644 index 000000000..4c24fb2df --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DirectiveArgumentFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.DirectiveArgumentFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DirectiveFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DirectiveFactory new file mode 100644 index 000000000..0ac8a60ff --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DirectiveFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.DirectiveFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DocumentFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DocumentFactory new file mode 100644 index 000000000..3e98b07ef --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.DocumentFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.DocumentFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.EnumFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.EnumFactory new file mode 100644 index 000000000..1ffbc1d47 --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.EnumFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.EnumFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FieldFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FieldFactory new file mode 100644 index 000000000..c96d07117 --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FieldFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.FieldFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FragmentFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FragmentFactory new file mode 100644 index 000000000..e3e40b93e --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FragmentFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.FragmentFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FragmentReferenceFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FragmentReferenceFactory new file mode 100644 index 000000000..8544120c9 --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.FragmentReferenceFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.FragmentReferenceFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InlineFragmentFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InlineFragmentFactory new file mode 100644 index 000000000..7c2415c6f --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InlineFragmentFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.InlineFragmentFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InputObjectFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InputObjectFactory new file mode 100644 index 000000000..6ef5d3841 --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InputObjectFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.InputObjectFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InputObjectFieldFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InputObjectFieldFactory new file mode 100644 index 000000000..67bfc1b1e --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.InputObjectFieldFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.InputObjectFieldFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.OperationFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.OperationFactory new file mode 100644 index 000000000..cd12c1d62 --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.OperationFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.OperationFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.VariableFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.VariableFactory new file mode 100644 index 000000000..86cc8afc2 --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.VariableFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.VariableFactoryImpl \ No newline at end of file diff --git a/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.VariableTypeFactory b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.VariableTypeFactory new file mode 100644 index 000000000..7c51f99c1 --- /dev/null +++ b/client/implementation/src/main/resources/META-INF/services/io.smallrye.graphql.client.core.factory.VariableTypeFactory @@ -0,0 +1 @@ +io.smallrye.graphql.client.impl.core.factory.VariableTypeFactoryImpl \ No newline at end of file