active-db.ts

import { getActiveDb, setActiveDb } from '../helpers/active-db';

export const activeDbResolver = {
  Mutation: {
    setActiveDb: async (parent, { id }, context) => {
      return await setActiveDb(context, id);
    }
  },
  Query: {
    getActiveDb: async (parent, args, context) => {
      return await getActiveDb(context);
    }
  }
};