create-node-ts-graphql-server/controllers/controllerGraphQL/index.ts
Alejandro Lembke Barrientos b55b0f61a9 PR-448199:
Adding files from first version.
Creating GraphQL server with their controllers and their models, squema and resolvers.
Adding support to webpack and typescript.
2022-05-25 21:08:50 +00:00

14 lines
340 B
TypeScript

'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 });
};