Class KlassGraphQLBundle<T extends io.dropwizard.Configuration & io.liftwizard.dropwizard.configuration.graphql.GraphQLFactoryProvider & DomainModelFactoryProvider & DataStoreFactoryProvider>

java.lang.Object
com.smoketurner.dropwizard.graphql.GraphQLBundle<T>
cool.klass.dropwizard.bundle.graphql.KlassGraphQLBundle<T>
All Implemented Interfaces:
com.smoketurner.dropwizard.graphql.GraphQLConfiguration<T>, io.dropwizard.ConfiguredBundle<T>

public class KlassGraphQLBundle<T extends io.dropwizard.Configuration & io.liftwizard.dropwizard.configuration.graphql.GraphQLFactoryProvider & DomainModelFactoryProvider & DataStoreFactoryProvider> extends com.smoketurner.dropwizard.graphql.GraphQLBundle<T>
The bundle registers the GraphIQL UI at /graphiql and the GraphQL Playground UI at /graphql-playground, by delegating to AssetsBundle. This overrides the behavior of the smoketurner bundle GraphQLBundle, which registers just one UI (graphiql in older versions, and graphql-playground in newer versions) and registers the UI at the root.

The bundle also registers two instrumentations for logging and metrics.

See Also:
  • Constructor Details

    • KlassGraphQLBundle

      public KlassGraphQLBundle()
  • Method Details

    • initialize

      public void initialize(@Nonnull io.dropwizard.setup.Bootstrap<?> bootstrap)
      Specified by:
      initialize in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration & io.liftwizard.dropwizard.configuration.graphql.GraphQLFactoryProvider & DomainModelFactoryProvider & DataStoreFactoryProvider>
      Overrides:
      initialize in class com.smoketurner.dropwizard.graphql.GraphQLBundle<T extends io.dropwizard.Configuration & io.liftwizard.dropwizard.configuration.graphql.GraphQLFactoryProvider & DomainModelFactoryProvider & DataStoreFactoryProvider>
    • run

      public void run(T configuration, io.dropwizard.setup.Environment environment) throws Exception
      Specified by:
      run in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration & io.liftwizard.dropwizard.configuration.graphql.GraphQLFactoryProvider & DomainModelFactoryProvider & DataStoreFactoryProvider>
      Overrides:
      run in class com.smoketurner.dropwizard.graphql.GraphQLBundle<T extends io.dropwizard.Configuration & io.liftwizard.dropwizard.configuration.graphql.GraphQLFactoryProvider & DomainModelFactoryProvider & DataStoreFactoryProvider>
      Throws:
      Exception
    • getGraphQLFactory

      @Nonnull public com.smoketurner.dropwizard.graphql.GraphQLFactory getGraphQLFactory(@Nonnull T configuration)