mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-01-10 05:56:48 -06:00
14 lines
340 B
TypeScript
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 });
|
||
|
};
|