Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jelorivera08
Created January 23, 2020 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jelorivera08/6a9931e02fefce907a577785f70a7d42 to your computer and use it in GitHub Desktop.
Save jelorivera08/6a9931e02fefce907a577785f70a7d42 to your computer and use it in GitHub Desktop.
const { noteType } = require('../nodeTypes');
const { GraphQLList } = require('graphql');
const NoteService = require('../../services/NoteService');
const NotesQuery = {
type: GraphQLList(noteType),
args: {},
resolve: async () => {
const noteService = new NoteService();
const notes = await noteService.getAllNotes();
return notes;
}
};
module.exports = { NotesQuery };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment