query { getUsers( opts: { curPage: 1, perPage: 30, q: "", sort: "-dateCreated", group: 2 } ) { users { id, email, fullName }, meta { curPage, perPage, totalPages, totalResults } } }
query { login( input: { userName: "admin@localhost.local", password: "12" } ) { user, token } }
mutation { createUser( input: { email: "alibaba@localhost.local", password: "1", fullName: "Alibaba", isSuperUser: 1, isStaff: 3, status: 3, isVerified: 3, verifyType: 1, isProfileUpdated: 3, groups: [1] } ) { id, fullName } }
`
curl localhost:9000/graphql
-F operations='{ "query": "mutation ($file: Upload!) { singleUpload(file: $file) { id } }", "variables": { "file": null } }'
-F map='{ "0": ["variables.file"] }' \ -F 0=@prosody.txt
`
- Enable mysql binlog
- Using golang to sync mysql to elasticsearch (automatic) -
go-mysql-elasticsearch -config=river.toml
- go get -v github.com/rubenv/sql-migrate/...
- sql-migrate up --help
- prettier --config ./.prettierrc --write "src/*/.ts"
- remove bcryptjs, node-python-hashser package
- pm2 start --name api npm -- start
- rm -rf /var/lock/subsys/elasticsearch
- Stop -> Remove Subsys -> Start
pm2 start --name api-poi npm -- start --interpreter=~/.nvm/versions/node/v10.20.1/bin/npm