Class RuntimeWiring

java.lang.Object
graphql.schema.idl.RuntimeWiring

@PublicApi public class RuntimeWiring extends 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 Details

    • MOCKED_WIRING

      public static final RuntimeWiring MOCKED_WIRING
      This is a Runtime wiring which provides mocked types resolver and scalars. It is useful for testing only, for example for creating schemas that can be inspected but not executed on.
  • Method Details

    • 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(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
    • getCodeRegistry

      public GraphQLCodeRegistry getCodeRegistry()
    • getScalars

      public Map<String,GraphQLScalarType> getScalars()
    • getDataFetchers

      public Map<String,Map<String,DataFetcher>> getDataFetchers()
    • getDataFetcherForType

      @Deprecated(since="2024-04-28") public Map<String,DataFetcher> getDataFetcherForType(String typeName)
      This is deprecated because the name has the wrong plural case.
      Parameters:
      typeName - the type for fetch a map of per field data fetchers for
      Returns:
      a map of field data fetchers for a type
    • getDataFetchersForType

      public Map<String,DataFetcher> getDataFetchersForType(String typeName)
      This returns a map of the data fetchers per field on that named type.
      Parameters:
      typeName - the type for fetch a map of per field data fetchers for
      Returns:
      a map of field data fetchers for a type
    • getDefaultDataFetcherForType

      public DataFetcher getDefaultDataFetcherForType(String typeName)
    • getTypeResolvers

      public Map<String,TypeResolver> getTypeResolvers()
    • getEnumValuesProviders

      public Map<String,EnumValuesProvider> getEnumValuesProviders()
    • getWiringFactory

      public WiringFactory getWiringFactory()
    • getFieldVisibility

      public GraphqlFieldVisibility getFieldVisibility()
    • getRegisteredDirectiveWiring

      public Map<String,SchemaDirectiveWiring> getRegisteredDirectiveWiring()
    • getDirectiveWiring

      public List<SchemaDirectiveWiring> getDirectiveWiring()
    • getComparatorRegistry

      public GraphqlTypeComparatorRegistry getComparatorRegistry()