class GroupResolversImpl implements GroupResolvers {

    @Override
    public DataFetcher<CompletableFuture<Group>> getGroupDataFetcher() {
        return environment -> {
            long groupId = getGroupId(environment);
            if (groupId <= 0) {
                return null;
            }

            DataLoader<Long, Group> dataLoader = environment.getDataLoader(GroupBatchLoader.KEY);
            return dataLoader.load(groupId);
        };
    }

}