class ExpandoValueResolversImpl implements ExpandoValueResolvers {

    @Override
    public DataFetcher<CompletableFuture<ExpandoValue>> getExpandoValueDataFetcher() {
        return environment -> {
            long valueId = util.getLongArg(environment, "valueId");
            if (valueId <= 0) {
                return null;
            }

            DataLoader<Long, ExpandoValue> dataLoader = environment.getDataLoader(ExpandoValueBatchLoader.KEY);
            return dataLoader.load(valueId);
        };
    }

}