java.lang.Object
com.graphql_java_generator.client.GraphQLTypeMappingRegistry

public class GraphQLTypeMappingRegistry extends Object
This class is a registry of the GraphQLTypeMapping classes that have been generated at runtime. These classes contains the mapping that allows to find at runtime the class that must be used for a given GraphQL type, from its name
  • Constructor Details

    • GraphQLTypeMappingRegistry

      public GraphQLTypeMappingRegistry()
  • Method Details

    • registerGraphQLTypeMapping

      public static void registerGraphQLTypeMapping(GraphQLTypeMapping graphQLTypeMapping)
      Registers the given GraphQLTypeMapping instance for the given schema
      Parameters:
      schemaName - The name of the schema
      graphQLTypeMapping - The GraphQLTypeMapping instance for this schema
    • isGraphQLTypeMappingRegistered

      public static boolean isGraphQLTypeMappingRegistered(String schemaName)
      Indicates whether a GraphQLTypeMapping instance has been registered for the given schema
      Parameters:
      schemaName -
      Returns:
    • getGraphQLTypeMapping

      public static GraphQLTypeMapping getGraphQLTypeMapping(String schemaName)
      Retrieves the GraphQLTypeMapping instance for the given schema
      Parameters:
      schemaName - The name of the schema
      Returns:
    • getJavaClass

      public static Class<?> getJavaClass(String schemaName, String typeName)
      Retrieves the Java class that maps to the given GraphQL type name, for the given schema
      Parameters:
      schemaName - The name of the schema
      typeName - The name of the GraphQL type, as found in the GraphQL schema
      Returns: