import { createSecretsService } from "./services/secrets-service.js";
export function createResolvers(db, transit) {
    const service = createSecretsService({ db, transit });
    return {
        Query: {
            envVars: (_p, { tenantId }) => service.listEnvVars(tenantId),
            secrets: (_p, { tenantId }) => service.listSecretKeys(tenantId),
        },
        Mutation: {
            setEnvVar: (_p, { tenantId, key, value }) => service.setEnvVar(tenantId, key, value),
            deleteEnvVar: (_p, { tenantId, key }) => service.deleteEnvVar(tenantId, key),
            setSecret: (_p, { tenantId, key, value }) => service.setSecret(tenantId, key, value),
            deleteSecret: (_p, { tenantId, key }) => service.deleteSecret(tenantId, key),
        },
    };
}
