This repository contains the excercises of the GraphQL Essential Training on LinkedIn Learning.
The following applications needs to be installed:
- Node.js
- Yarn
- MongoDB
yarn start
mutation {
createFriend(input: {
firstName: "Agaton"
lastName: "Sax"
gender: MALE
age: 44
}){
id
firstName
age
}
}
mutation {
createFriend(input: {
firstName: "Ture"
lastName: "Sventon"
gender: MALE
age: 40
}){
id
firstName
age
}
}
mutation {
updateFriend(input: {
id: "5d128f75f6524f6aab902759"
firstName: "Ture"
age: 41
}) {
firstName
lastName
age
}
}
query {
one: getOneFriend(id: "5d128f60f6524f6aab902758") {
...friendFragment
}
second: getOneFriend(id: "5d128f75f6524f6aab902759") {
...friendFragment
}
}
fragment friendFragment on Friend {
firstName
lastName
age
}
mutation {
deleteFriend(id: "5d128f75f6524f6aab902759")
}