Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Starter reorganization #617

Merged
merged 67 commits into from
May 15, 2021
Merged

Starter reorganization #617

merged 67 commits into from
May 15, 2021

Conversation

oliemansm
Copy link
Member

@oliemansm oliemansm commented May 8, 2021

Started work on consolidating all starters into one module as suggested in #516.

Schema strategy

The library supports two strategies: tools and annotations. By default the tools strategy is enabled in this approach. You can switch to annotations by setting the property:

graphql.schema-strategy: annotations

Is there a better/alternative way on automatically selecting the right strategy to use based on available beans or other configurations on the class path? Are certain properties for annotations required for example and could we therefore enable it automatically if we see that one or all of those required parameters have been provided?

Web application type

There's just one graphql-spring-boot-starter now and it no longer pulls in the related spring-boot-starter-web or spring-boot-starter-webflux packages anymore. Instead users are now required to explicitly include one of those starters themselves to define which web application type to start up. The starters are now configured to keep that web application type in mind and only configure elements that are compatible with that type.

Editors

Moved all editor starters inside the main starter and introduced enabled properties to enable them. All properties have been moved inside the graphql group, e.g.

graphql:
  playground:
    enabled: true
    cdn:
      enabled: false
      version: latest
  altair:
    enabled: true
    cdn:
      enabled: false
  graphiql:
    enabled: true
    cdn:
      enabled: false
      version: 0.17.5
    headers:
      Test: TestHeader
    props:
      variables:
        headerEditorEnabled: true
        headers: '{ "Authorization": "SomeValue" }'
  voyager:
    enabled: true
    cdn:
      enabled: false

@setchy
Copy link
Member

setchy commented May 9, 2021

Nice! What do you think about the example-* modules? Should we pull them out to a new repository, or add them into https://github.com/graphql-java-kickstart/samples?

@oliemansm
Copy link
Member Author

Those example projects are on my list too, to move them into the samples repo.

@github-actions
Copy link

github-actions bot commented May 13, 2021

Unit Test Results

  88 files    88 suites   43s ⏱️
242 tests 242 ✔️ 0 💤 0 ❌
247 runs  247 ✔️ 0 💤 0 ❌

Results for commit 4703014.

♻️ This comment has been updated with latest results.

@oliemansm oliemansm marked this pull request as ready for review May 14, 2021 14:48
@sonarcloud
Copy link

sonarcloud bot commented May 14, 2021

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQLTestAutoConfiguration tries to autowire TestRestTemplate regardless of WebEnvironment
2 participants