java.lang.Object
com.graphql_java_generator.client.directive.DirectiveRegistryImpl
All Implemented Interfaces:
DirectiveRegistry

@Component public class DirectiveRegistryImpl extends Object implements DirectiveRegistry
Author:
etienne-sf
  • Constructor Details

    • DirectiveRegistryImpl

      public DirectiveRegistryImpl()
  • Method Details

    • registerDirectiveRegistry

      public static void registerDirectiveRegistry(String schema, Consumer<DirectiveRegistry> directiveRegistryInitializer)
      Creates and register the DirectiveRegistry for the given schema, only if it has not already been registered.
      Parameters:
      schema - value of the springBeanSuffix plugin parameter for the searched schema. When there is only one schema, this plugin parameter is usually not set. In this case, its default value ("") is used.
      directiveRegistryInitializer - The function that created the DirectiveRegistry. It will be called only if needed, that is: if the DirectiveRegistry for this schema has not already been registered
    • getDirective

      public static Directive getDirective(String schema, String directiveName)
      Retrieves the directive of the given name, from the given schema
      Parameters:
      schema - value of the springBeanSuffix plugin parameter for the searched schema. When there is only one schema, this plugin parameter is usually not set. In this case, its default value ("") is used.
      directiveName -
    • registerDirective

      public void registerDirective(Directive type)
      Description copied from interface: DirectiveRegistry
      Manually register one GraphQL directive.
      Specified by:
      registerDirective in interface DirectiveRegistry
    • getDirective

      public Directive getDirective(String name)
      Description copied from interface: DirectiveRegistry
      Retrieves the registered GraphQLScalarType for this GraphQL CustomScalar.
      Specified by:
      getDirective in interface DirectiveRegistry
      Returns:
      the Directive, or null if no directive has been registered for the given name