How can we support SpringBoot?
Opened this issue · 0 comments
Rashi0321 commented
I am facing challenges to reach my GraphQL server with SpringBoot framework. Here is my Configuration class.
@configuration
@componentscan(basePackages = { "firstexample",
"firstexample.pet.gen" }, includeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = javax.inject.Provider.class))
public class GraphQLConfig {
@Bean
public Map<String, GraphQLObjectType> graphqlTypeMap(List<Provider<? extends GraphQLObjectType>> typeList) {
return typeList.stream().map(Provider::get)
.collect(Collectors.toMap(GraphQLObjectType::getName, Function.identity()));
}
}
I have tried quite a few options but nothing seems to work. Am I missing something?