This is a simple server implementation to store/retrieve songs using GraphQL with Apollo.
npm install
npm start
This repo contains a basic linting setup using eslint and prettier. You can setup your editor to show (and auto-fix on save) linting errors, e.g. using the VS Code ESLint extension.
You can also run:
npm run eslint
to show linting errorsnpm run eslint-fix
to auto-fix linting errors
Start the server & access the GraphQL Playground IDE, e.g. on localhost:4000
.
IMPORTANT: This is just a sample API, you can modify it if needed.
To query songs:
query {
songs {
_id
title
keyStrokes
}
}
To add a song:
mutation {
addSong(title: "Some new song", keyStrokes: ["D", "E", "F"]) {
_id
title
keyStrokes
}
}