Class DirectiveRegistryImpl
java.lang.Object
com.graphql_java_generator.client.directive.DirectiveRegistryImpl
- All Implemented Interfaces:
DirectiveRegistry
- Author:
- etienne-sf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDirective(String name) Retrieves the registeredGraphQLScalarTypefor this GraphQL CustomScalar.static DirectivegetDirective(String schema, String directiveName) Retrieves the directive of the given name, from the given schemavoidregisterDirective(Directive type) Manually register one GraphQL directive.static voidregisterDirectiveRegistry(String schema, Consumer<DirectiveRegistry> directiveRegistryInitializer) Creates and register theDirectiveRegistryfor the given schema, only if it has not already been registered.
-
Constructor Details
-
DirectiveRegistryImpl
public DirectiveRegistryImpl()
-
-
Method Details
-
registerDirectiveRegistry
public static void registerDirectiveRegistry(String schema, Consumer<DirectiveRegistry> directiveRegistryInitializer) Creates and register theDirectiveRegistryfor 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 theDirectiveRegistry. It will be called only if needed, that is: if theDirectiveRegistryfor this schema has not already been registered
-
getDirective
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
Description copied from interface:DirectiveRegistryManually register one GraphQL directive.- Specified by:
registerDirectivein interfaceDirectiveRegistry
-
getDirective
Description copied from interface:DirectiveRegistryRetrieves the registeredGraphQLScalarTypefor this GraphQL CustomScalar.- Specified by:
getDirectivein interfaceDirectiveRegistry- Returns:
- the
Directive, or null if no directive has been registered for the given name
-