-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45516 from mcruzdev/config-vertx-graphql
Convert vertx-graphql to use @ConfigMapping
- Loading branch information
Showing
4 changed files
with
14 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
...phql/deployment/src/main/java/io/quarkus/vertx/graphql/deployment/VertxGraphqlConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
package io.quarkus.vertx.graphql.deployment; | ||
|
||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
|
||
@ConfigRoot | ||
public final class VertxGraphqlConfig { | ||
@ConfigMapping(prefix = "quarkus.vertx-graphql") | ||
public interface VertxGraphqlConfig { | ||
|
||
/** | ||
* GraphQL UI configuration | ||
*/ | ||
@ConfigItem | ||
VertxGraphqlUiConfig ui; | ||
VertxGraphqlUiConfig ui(); | ||
|
||
@ConfigGroup | ||
public static class VertxGraphqlUiConfig { | ||
interface VertxGraphqlUiConfig { | ||
/** | ||
* If GraphQL UI should be included every time. By default, this is only included when the application is running | ||
* in dev mode. | ||
*/ | ||
@ConfigItem | ||
boolean alwaysInclude; | ||
@WithDefault("false") | ||
boolean alwaysInclude(); | ||
|
||
/** | ||
* The path where GraphQL UI is available. | ||
* <p> | ||
* The value `/` is not allowed as it blocks the application from serving anything else. | ||
*/ | ||
@ConfigItem(defaultValue = "graphql-ui") | ||
String path; | ||
@WithDefault("graphql-ui") | ||
String path(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters