Skip to content

fix: add spring-graphql to graphq-jpa-query autoconfigure module #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Dec 19, 2022

Conversation

igdianov
Copy link
Collaborator

@igdianov igdianov commented Oct 29, 2022

  • Added @EnableGraphQLJpaQuerySchema annotation to trigger GraphQLSchemaBuilderAutoConfiguration, i.e.
@SpringBootApplication
@EnableGraphQLJpaQuerySchema(basePackageClasses=Character.class)
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
    
}
  • Added GraphQLJPASchemaBuilderCustomizer to customize GraphQLJpaSchemaBuilder features at runtime, i.e.
@SpringBootApplication
@EnableGraphQLJpaQuerySchema(basePackageClasses=Book.class)
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
    
    @Configuration
    public static class GraphQLJpaQuerySchemaConfigurer {

        @Bean
        GraphQLJPASchemaBuilderCustomizer graphQLSchemaBuilderCustomizer() {
            return builder -> builder.enableRelay(true);
        }
    }
}
  • Added auto configuration support for GraphQLSchema factory bean integration with Spring GraphQlSource and ExecutionGraphQlService, i.e. graphql-jpa-query-example-spring-graphql example

@igdianov igdianov self-assigned this Oct 29, 2022
@codecov
Copy link

codecov bot commented Dec 18, 2022

Codecov Report

Base: 73.74% // Head: 73.82% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (e8e4529) compared to base (e7dbbce).
Patch coverage: 97.43% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #315      +/-   ##
============================================
+ Coverage     73.74%   73.82%   +0.08%     
- Complexity     1144     1150       +6     
============================================
  Files            84       85       +1     
  Lines          5069     5082      +13     
  Branches        722      723       +1     
============================================
+ Hits           3738     3752      +14     
+ Misses         1021     1019       -2     
- Partials        310      311       +1     
Impacted Files Coverage Δ
...phQLJpaQueryGraphQlExecutionAutoConfiguration.java 80.00% <ø> (ø)
...GraphQLJpaQueryGraphQlSourceAutoConfiguration.java 68.75% <ø> (ø)
...query/autoconfigure/GraphQLJpaQueryProperties.java 62.50% <ø> (-7.50%) ⬇️
.../autoconfigure/GraphQLSchemaAutoConfiguration.java 100.00% <ø> (ø)
...oconfigure/JavaScalarsRuntimeWiringConfigurer.java 20.00% <ø> (ø)
...graphql/jpa/query/autoconfigure/TypeTraverser.java 94.11% <ø> (ø)
...entures/graphql/jpa/query/example/Application.java 33.33% <ø> (ø)
...entures/graphql/jpa/query/example/Application.java 50.00% <ø> (ø)
...ure/EnableGraphQLJpaQuerySchemaImportSelector.java 91.66% <91.66%> (ø)
...nfigure/GraphQLSchemaBuilderAutoConfiguration.java 100.00% <100.00%> (+87.50%) ⬆️
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@igdianov igdianov force-pushed the common-autoconfigure branch 3 times, most recently from 599f8f1 to ab4de24 Compare December 19, 2022 02:29
@igdianov igdianov force-pushed the common-autoconfigure branch from ab4de24 to 1b2561f Compare December 19, 2022 02:37
@igdianov igdianov changed the title fix: move spring graphql auto configuration to graphq-jpa-query autoconfigure module fix: add spring-graphql to graphq-jpa-query autoconfigure module Dec 19, 2022
@igdianov igdianov closed this Dec 19, 2022
@igdianov igdianov reopened this Dec 19, 2022
@igdianov igdianov merged commit 9809aef into master Dec 19, 2022
@igdianov igdianov deleted the common-autoconfigure branch December 19, 2022 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant