https://www.udemy.com/course/graphql-with-react-course/
changes I made:
.mjs
- some API changes in graphql
- mongodb in local container
- functional components
@apollo/client
-> useMutation & useQueryreact-router
6
docker run --name fdm-mongo -p 27017:27017 -d mongo
mutation {
addSong(title: "Cold Night") {
id
}
}
mutation {
addLyricToSong(
content: "oh my oh my it's a cold night"
songId: "62309b2577d41d1d22a115c8"
) {
id
}
}
{
songs {
id
title
lyrics {
content
}
}
}