37
37
import com .introproventures .graphql .jpa .query .schema .impl .GraphQLJpaExecutor ;
38
38
import com .introproventures .graphql .jpa .query .schema .impl .GraphQLJpaExecutorContextFactory ;
39
39
import com .introproventures .graphql .jpa .query .schema .impl .GraphQLJpaSchemaBuilder ;
40
-
41
40
import graphql .GraphQL ;
42
41
import graphql .GraphQLContext ;
43
42
import graphql .execution .instrumentation .Instrumentation ;
@@ -56,42 +55,42 @@ public static class DefaultGraphQLJpaQueryConfiguration {
56
55
@ Bean
57
56
@ ConditionalOnMissingBean
58
57
@ ConditionalOnSingleCandidate (EntityManagerFactory .class )
59
- public GraphQLSchemaBuilder graphQLSchemaBuilder (final EntityManagerFactory entityManagerFactory ) {
58
+ public GraphQLSchemaBuilder graphQLJpaSchemaBuilder (final EntityManagerFactory entityManagerFactory ) {
60
59
return new GraphQLJpaSchemaBuilder (entityManagerFactory .createEntityManager ());
61
60
}
62
-
61
+
63
62
@ Bean
64
63
@ ConditionalOnMissingBean
65
64
public GraphQLSchemaConfigurer graphQLJpaQuerySchemaConfigurer (GraphQLSchemaBuilder graphQLSchemaBuilder ) {
66
-
65
+
67
66
return (registry ) -> {
68
67
registry .register (graphQLSchemaBuilder .build ());
69
68
};
70
69
}
71
-
72
- @ Bean
70
+
71
+ @ Bean
73
72
@ ConditionalOnMissingBean
74
- public GraphQLExecutorContextFactory graphQLExecutorContextFactory (ObjectProvider <GraphQLExecutionInputFactory > graphQLExecutionInputFactory ,
73
+ public GraphQLExecutorContextFactory graphQLJpaExecutorContextFactory (ObjectProvider <GraphQLExecutionInputFactory > graphQLExecutionInputFactory ,
75
74
ObjectProvider <Supplier <GraphqlFieldVisibility >> graphqlFieldVisibility ,
76
75
ObjectProvider <Supplier <Instrumentation >> instrumentation ,
77
76
ObjectProvider <Supplier <GraphQLContext >> graphqlContext ) {
78
77
GraphQLJpaExecutorContextFactory bean = new GraphQLJpaExecutorContextFactory ();
79
-
78
+
80
79
graphQLExecutionInputFactory .ifAvailable (bean ::withExecutionInputFactory );
81
80
graphqlFieldVisibility .ifAvailable (bean ::withGraphqlFieldVisibility );
82
81
instrumentation .ifAvailable (bean ::withInstrumentation );
83
82
graphqlContext .ifAvailable (bean ::withGraphqlContext );
84
-
83
+
85
84
return bean ;
86
85
}
87
86
88
87
@ Bean
89
88
@ ConditionalOnMissingBean
90
- public GraphQLExecutor graphQLExecutor (GraphQLSchema graphQLSchema ,
91
- GraphQLExecutorContextFactory graphQLExecutorContextFactory ) {
89
+ public GraphQLExecutor graphQLJpaExecutor (GraphQLSchema graphQLSchema ,
90
+ GraphQLExecutorContextFactory graphQLExecutorContextFactory ) {
92
91
return new GraphQLJpaExecutor (graphQLSchema ,
93
92
graphQLExecutorContextFactory );
94
93
}
95
-
94
+
96
95
}
97
96
}
0 commit comments