Class TypeRuntimeWiring


  • @PublicApi
    public class TypeRuntimeWiring
    extends java.lang.Object
    A type runtime wiring is a specification of the data fetchers and possible type resolver for a given type name. This is used by RuntimeWiring to wire together a functional GraphQLSchema
    • Method Detail

      • newTypeWiring

        public static TypeRuntimeWiring.Builder newTypeWiring​(java.lang.String typeName)
        Creates a new type wiring builder
        Parameters:
        typeName - the name of the type to wire
        Returns:
        the builder
      • newTypeWiring

        public static TypeRuntimeWiring newTypeWiring​(java.lang.String typeName,
                                                      java.util.function.UnaryOperator<TypeRuntimeWiring.Builder> builderFunction)
        This form allows a lambda to be used as the builder
        Parameters:
        typeName - the name of the type to wire
        builderFunction - a function that will be given the builder to use
        Returns:
        the same builder back please
      • getTypeName

        public java.lang.String getTypeName()
      • getFieldDataFetchers

        public java.util.Map<java.lang.String,​DataFetcher> getFieldDataFetchers()
      • getDefaultDataFetcher

        public DataFetcher getDefaultDataFetcher()