Map<String, List<GraphQLObjectType>> groupImplementations(GraphQLSchema schema) {
        Map<String, List<GraphQLObjectType>> result = new LinkedHashMap<>();
        for (GraphQLType type : schema.getAllTypesAsList()) {
            if (type instanceof GraphQLObjectType) {
                for (GraphQLOutputType interfaceType : ((GraphQLObjectType) type).getInterfaces()) {
                    List<GraphQLObjectType> myGroup = result.computeIfAbsent(interfaceType.getName(), k -> new ArrayList<>());
                    myGroup.add((GraphQLObjectType) type);
                }
            }
        }

        return result;
    }
Map < String , List < GraphQLObjectType > > groupImplementations ( GraphQLSchema schema ) { Map < String , List < GraphQLObjectType > > result = new LinkedHashMap < > ( ) ; for ( GraphQLType type : schema . getAllTypesAsList ( ) ) { if ( type instanceof GraphQLObjectType ) { for ( GraphQLOutputType interfaceType : ( ( GraphQLObjectType ) type ) . getInterfaces ( ) ) { List < GraphQLObjectType > myGroup = result . computeIfAbsent ( interfaceType . getName ( ) , k -> new ArrayList < > ( ) ) ; myGroup . add ( ( GraphQLObjectType ) type ) ; } } } return result ; }
/*
Indexes GraphQLObject types registered with the provided schema by implemented GraphQLInterface name

This helps in accelerates/simplifies collecting types that implement a certain interface

Provided to replace {@link #findImplementations(graphql.schema.GraphQLSchema, graphql.schema.GraphQLInterfaceType)}