Class DefaultGraphqlTypeComparatorRegistry

    • Field Detail

      • DEFAULT_COMPARATOR

        public static final java.util.Comparator<GraphQLSchemaElement> DEFAULT_COMPARATOR
    • Method Detail

      • sensibleGroupedOrder

        public static java.util.Comparator<GraphQLSchemaElement> sensibleGroupedOrder()
        This orders the schema into a sensible grouped order
        Returns:
        a comparator that allows for sensible grouped order
      • getComparator

        public <T extends GraphQLSchemaElement> java.util.Comparator<? super T> getComparator​(GraphqlTypeComparatorEnvironment environment)
        Search for the most to least specific registered Comparator otherwise a default is returned.
        Specified by:
        getComparator in interface GraphqlTypeComparatorRegistry
        Type Parameters:
        T - the type of the comparator
        Parameters:
        environment - Defines the scope to control where the Comparator can be applied.
        Returns:
        The registered Comparator or null if not found.
      • defaultComparators

        public static GraphqlTypeComparatorRegistry defaultComparators()
        Returns:
        A registry where all GraphQLTypes receive a default Comparator by comparing GraphQLType::getName.