make create-db
make run
Run play ground:
localhost:3000/
Create new user:
mutation {
createUser(input:{
username: "user2",
password: "123456",
email:"[email protected]"
})
}
Login as user:
mutation {
login(input:{username: "user2", password: "123456"})
}
Login as admin (ROLE ADMIN auto generate when migarate database):
mutation {
login(input:{username: "admin", password: "password"})
}
Fetch 100 first sample earthquake (JUST ADMIN):
localhost:3000/fetchgeo
Multifilter earthquake:
query ListEarthquakes($filter: EarthquakeFilterByDay, $pagination: PaginationInput){
listEarthquakesByDay(filter: $filter, pagination: $pagination) {
id,
mag
}
}
Variables:
{
"filter": {
"magnitude": 0.5,
"place": "CA",
"dayAgo": 1
},
"pagination": {
"limit": 6,
"offset": 10
}
}
Header:
{
"Authorization": <User's token>
}
Log out:
query {
logout
}