"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolvers = exports.getPluginContext = void 0;
const Canvas_1 = __importDefault(require("./Canvas"));
const faker_1 = require("./db/faker");
const fauna_1 = require("./db/fauna");
const s3_1 = require("./db/s3");
let pluginModels;
if (process.env.DB_DRIVER === "DB_FAUNA") {
    pluginModels = fauna_1.models;
}
else if (process.env.DB_DRIVER === "DB_S3") {
    pluginModels = s3_1.models;
}
else {
    pluginModels = faker_1.models;
}
/**
 * Anything that this plugin offers to the server context is retrieved here
 */
function getPluginContext({ models }) {
    //Merge models
    models = Object.assign(Object.assign({}, models), pluginModels);
    return { models };
}
exports.getPluginContext = getPluginContext;
exports.resolvers = {
    canvasResolvers: Canvas_1.default,
};
