class DDMStructureResolversImpl implements DDMStructureResolvers {

    @Override
    public DataFetcher<CompletableFuture<DDMStructure>> getDDMStructureDataFetcher() {
        return environment -> {
            long structureId = getStructureId(environment);
            if (structureId <= 0) {
                return null;
            }

            DataLoader<Long, DDMStructure> dataLoader = environment.getDataLoader(DDMStructureBatchLoader.KEY);
            return dataLoader.load(structureId);
        };
    }

}