generated at
curlやHTTPieでGraphQLを送る
curlでも使える
bash
curl 'http://snowtooth.herokuapp.com/' \ -H 'Content-Type: application/json' \ --data '{"query":"{ allLifts { name }}"}'
見て分かる通り、こんなqueryをおくってる
graphql
{ allLifts { name } }
mutation
bash
curl 'http://snowtooth.herokuapp.com/' \ -H 'Content-Type: application/json' \ --data '{"query":"mutation {setLiftStatus(id: \"panorama\" status: OPEN) {name status}}"}'
HTTPieなら
bash
λ http POST http://snowtooth.herokuapp.com query='{"query":"{ allLifts { name }}"}'