This repo are creating following the Rocketseat Experts Club video (collection of DoWhile 2020).
- Implementing the relation on get list of videos.
1. Get Categories
query Categories {
categories {
_id,
name
}
}
2. Create Category
mutation {
createCategory(categoryInput: {
name: "Name of my category",
description: "Category description"
}) {
name,
_id
}
}
3. Get Videos
query Videos {
videos {
name,
category {
name
}
}
}
4. Create Video
mutation {
createVideo(videoInput: {
name: "Name of my video",
description: "Description of my video",
category: "<id of category>"
}) {
_id,
name
}
}