import { ChargesProvider } from '../../charges/providers/charges.provider.js';
import { autoMatchChargesResolver } from './auto-match-charges.resolver.js';
import { findChargeMatchesResolver } from './find-charge-matches.resolver.js';
export const chargesMatcherResolvers = {
    Query: {
        ...findChargeMatchesResolver.Query,
    },
    Mutation: {
        ...autoMatchChargesResolver.Mutation,
    },
    ChargeMatch: {
        charge: async ({ chargeId }, _args, { injector }) => injector
            .get(ChargesProvider)
            .getChargeByIdLoader.load(chargeId)
            .then(res => {
            if (!res) {
                throw new Error(`Charge ID="${chargeId}" not found`);
            }
            return res;
        }),
    },
};
//# sourceMappingURL=index.js.map