Skip to content

Instantly share code, notes, and snippets.

@nparsons08 nparsons08/task.js Secret
Last active Nov 3, 2019

Embed
What would you like to do?
import { Task, TaskTC } from '../models/task';
const TaskQuery = {
taskById: TaskTC.getResolver('findById'),
taskByIds: TaskTC.getResolver('findByIds'),
taskOne: TaskTC.getResolver('findOne'),
taskMany: TaskTC.getResolver('findMany'),
taskCount: TaskTC.getResolver('count'),
taskConnection: TaskTC.getResolver('connection'),
taskPagination: TaskTC.getResolver('pagination'),
};
const TaskMutation = {
taskCreateOne: TaskTC.getResolver('createOne'),
taskCreateMany: TaskTC.getResolver('createMany'),
taskUpdateById: TaskTC.getResolver('updateById'),
taskUpdateOne: TaskTC.getResolver('updateOne'),
taskUpdateMany: TaskTC.getResolver('updateMany'),
taskRemoveById: TaskTC.getResolver('removeById'),
taskRemoveOne: TaskTC.getResolver('removeOne'),
taskRemoveMany: TaskTC.getResolver('removeMany'),
};
export { TaskQuery, TaskMutation };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.