Interface CustomScalarRegistry


public interface CustomScalarRegistry
Registry for all GraphQLScalarType available.
Author:
etienne-sf
  • Method Summary

    Modifier and Type
    Method
    Description
    getCustomScalar(String graphQLTypeName)
    Retrieves the registered GraphQLScalarType for this GraphQL CustomScalar.
    graphql.schema.GraphQLScalarType
    Retrieves the registered GraphQLScalarType for this GraphQL CustomScalar.
    void
    registerGraphQLScalarType(String typeName, graphql.schema.GraphQLScalarType graphQLScalarType, Class<?> valueClazz)
    Manually register one GraphQLScalarType.
  • Method Details

    • registerGraphQLScalarType

      void registerGraphQLScalarType(String typeName, graphql.schema.GraphQLScalarType graphQLScalarType, Class<?> valueClazz)
      Manually register one GraphQLScalarType.
      Parameters:
      typeName - The name of the custom scalar type, as defined in the provided GaphQL schema. It may be different from the provided graphQLScalarType
      graphQLScalarType - The GraphQL custom scalar class, that contain the coercing rules to serialize and unserialize this custom scalar
      valueClazz - The java The java type that will contain values for this custom scalar. This is needed to properly create the data from the value read in a string, especially when reading a GraphQL request, when in client mode
    • getGraphQLCustomScalarType

      graphql.schema.GraphQLScalarType getGraphQLCustomScalarType(String graphQLTypeName)
      Retrieves the registered GraphQLScalarType for this GraphQL CustomScalar.
      Parameters:
      graphQLTypeName -
      Returns:
      the GraphQLScalarType, or null if no converter has been registered for the given name
    • getCustomScalar

      CustomScalar getCustomScalar(String graphQLTypeName)
      Retrieves the registered GraphQLScalarType for this GraphQL CustomScalar.
      Parameters:
      graphQLTypeName -
      Returns:
      the GraphQLScalarType, or null if no converter has been registered for the given name