Package gql.ratpack

Class GraphQLProvider

  • All Implemented Interfaces:
    javax.inject.Provider<graphql.GraphQL>

    public class GraphQLProvider
    extends Object
    implements javax.inject.Provider<graphql.GraphQL>
    Creates an instance of GraphQL that can be reused among all incoming requests.
    Since:
    0.3.2
    • Constructor Detail

      • GraphQLProvider

        public GraphQLProvider()
    • Method Detail

      • setGraphQLSchema

        @Inject
        public void setGraphQLSchema​(graphql.schema.GraphQLSchema schema)
        Sets the GraphQLSchema instance. This is a hard dependency
        Since:
        0.3.2
      • setInstrumentation

        @Inject(optional=true)
        public void setInstrumentation​(graphql.execution.instrumentation.Instrumentation instrumentation)
        Sets the Instrumentation instance used. This is a soft dependency
        Since:
        0.3.2
      • get

        public graphql.GraphQL get()
        Specified by:
        get in interface javax.inject.Provider<graphql.GraphQL>