Class RuntimeWiring


  • @PublicApi
    public class RuntimeWiring
    extends java.lang.Object
    A runtime wiring is a specification of data fetchers, type resolvers and custom scalars that are needed to wire together a functional GraphQLSchema
    • Field Detail

      • MOCKED_WIRING

        public static final RuntimeWiring MOCKED_WIRING
        This is a Runtime wiring which provides mocked types resolver and scalars. Useful for testing only.
    • Method Detail

      • newRuntimeWiring

        public static RuntimeWiring.Builder newRuntimeWiring()
        Returns:
        a builder of Runtime Wiring
      • newRuntimeWiring

        public static RuntimeWiring.Builder newRuntimeWiring​(RuntimeWiring originalRuntimeWiring)
        Parameters:
        originalRuntimeWiring - the runtime wiring to start from
        Returns:
        a builder of Runtime Wiring based on the provided one
      • transform

        public RuntimeWiring transform​(java.util.function.Consumer<RuntimeWiring.Builder> builderConsumer)
        This helps you transform the current RuntimeWiring object into another one by starting a builder with all the current values and allows you to transform it how you want.
        Parameters:
        builderConsumer - the consumer code that will be given a builder to transform
        Returns:
        a new RuntimeWiring object based on calling build on that builder
      • getScalars

        public java.util.Map<java.lang.String,​GraphQLScalarType> getScalars()
      • getDataFetchers

        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​DataFetcher>> getDataFetchers()
      • getDataFetcherForType

        public java.util.Map<java.lang.String,​DataFetcher> getDataFetcherForType​(java.lang.String typeName)
      • getDefaultDataFetcherForType

        public DataFetcher getDefaultDataFetcherForType​(java.lang.String typeName)
      • getTypeResolvers

        public java.util.Map<java.lang.String,​TypeResolver> getTypeResolvers()
      • getEnumValuesProviders

        public java.util.Map<java.lang.String,​EnumValuesProvider> getEnumValuesProviders()
      • getRegisteredDirectiveWiring

        public java.util.Map<java.lang.String,​SchemaDirectiveWiring> getRegisteredDirectiveWiring()