create-node-ts-graphql-server/controllers/controllerGraphQL/index.ts

14 lines
340 B
TypeScript
Raw Normal View History

'use strict';
import { getTestModel, addTextModel } from '../../models';
// eslint-disable-next-line
export const getTest = async (rootValue, args, context) => {
return getTestModel();
};
// eslint-disable-next-line
export const addText = async (rootValue, args, context) => {
const text = args.text;
return addTextModel({ text });
};