npm install -g sequelize-cliinisialisasi proyek Sequelize dengan perintah berikut:
sequelize initsequelize model:generate --name Country --attributes id:string(15):primaryKey,name:string,code:string
sequelize model:generate --name Salesorg --attributes id:string,name:string
sequelize model:generate --name Company --attributes name:string,industry:string,countryId:integersequelize db:migratemutation {
createCountries(countries: [{id: "IDN", name: "Indonesia", code: "ID"}, {id: "MYS", name: "Malaysia", code: "MY"}]) {
id
name
code
}
}{
getCountries {
id
name
code
}
}mutation {
updateCountry(id: "IDN", name: "Indonesia Raya") {
id
name
code
}
} mutation {
deleteCountry(id: "IDN") {
id
name
code
}
}curl -X POST http://localhost:4000/graphql -H "Content-Type: application/json" -d "{\"query\": \"{ getCountries { id name code }}\"}"