Created
January 23, 2020 05:24
-
-
Save jelorivera08/6a9931e02fefce907a577785f70a7d42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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