Class CustomScalarRegistryImpl
java.lang.Object
com.graphql_java_generator.customscalars.CustomScalarRegistryImpl
- All Implemented Interfaces:
CustomScalarRegistry
- Author:
- etienne-sf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCustomScalar(String graphQLTypeName) static CustomScalarRegistrygetCustomScalarRegistry(String schema) Retrieves theCustomScalarRegistryfor the given schema.graphql.schema.GraphQLScalarTypegetGraphQLCustomScalarType(String graphQLTypeName) voidregisterGraphQLScalarType(graphql.schema.GraphQLScalarType type, Class<?> valueClazz) static voidsetCustomScalarRegistry(String schema, CustomScalarRegistry customScalarRegistry) Sets theCustomScalarRegistryfor the given schema.
-
Constructor Details
-
CustomScalarRegistryImpl
public CustomScalarRegistryImpl()
-
-
Method Details
-
registerGraphQLScalarType
- Specified by:
registerGraphQLScalarTypein interfaceCustomScalarRegistry
-
getGraphQLCustomScalarType
- Specified by:
getGraphQLCustomScalarTypein interfaceCustomScalarRegistry
-
getCustomScalar
- Specified by:
getCustomScalarin interfaceCustomScalarRegistry
-
getCustomScalarRegistry
Retrieves theCustomScalarRegistryfor the given schema. This registry is initialized in the generated classCustomScalarRegistryInitializer.
Note: this method is an internal utility method.- 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.- Returns:
- Throws:
IllegalArgumentException- If noCustomScalarRegistryhas been defined for the given schema
-
setCustomScalarRegistry
public static void setCustomScalarRegistry(String schema, CustomScalarRegistry customScalarRegistry) Sets theCustomScalarRegistryfor the given schema. This method should only be called from the generated classCustomScalarRegistryInitializer.
Note: this method is an internal utility method.- 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.customScalarRegistry- TheCustomScalarRegistryassociated with this schema
-