# HG changeset patch # User Matěj Cepl # Date 1722379599 -7200 # Wed Jul 31 00:46:39 2024 +0200 # Node ID 0787ee68488c169b21c4d35b27e937aac15d5bdd # Parent d2a438e87e7beaa9a15220550bbd837e4037f1cb graphql: suggest using hut utility instead of curl in default query `hut` utility is much more approachable for a newbie, because it deals with all issues of authentication for an user. Signed-off-by: Matěj Cepl diff --git a/hgsrht/default_query.graphql b/hgsrht/default_query.graphql --- a/hgsrht/default_query.graphql +++ b/hgsrht/default_query.graphql @@ -29,13 +29,11 @@ major, minor, patch } - # On this page, you have been automatically authorized to make API requests - # with your sr.ht login cookie. If you wish to make GraphQL requests outside - # of the browser, create a personal access token at https://meta.sr.ht/oauth + # The same results as with this Web utility you can get with `hut` + # utility (https://sr.ht/~xenrox/hut/) # - # curl \ - # -H Authorization:"Bearer " \ - # -H Content-Type:application/json \ - # -d '{"query": "{ me { canonicalName } }"}' \ - # https://git.sr.ht/query + # echo 'query { me { canonicalName } }' | hut graphql hg + # + # Or, use `hut graphql hg` to edit GraphQL queries with + # your $EDITOR. }