~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/default_query.graphql -rw-r--r-- 1.3 KiB
72548bd7Drew DeVault API: Updates per core-go auth changes 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Welcome to the SourceHut GraphQL explorer!
# You can use this to run test requests against the GraphQL API.
# To view the GraphQL schema, expand the button on the bottom of this page.
# Here's a sample query to get you started:
query {
  # Fetch info about the authenticated user (you):
  me {
    # Grab their canonical name:
    canonicalName
    # And a list of their SSH keys:
    sshKeys {
      # This resource is paginated, so it has a cursor. If you pass this
      # value into sshKeys(cursor:"...") in a subsequent request, you'll
      # get the next page.
      cursor
      # These are the actual results.
      results {
        id
        fingerprint
        comment
      }
    }
  }

  # Also fetch the API version. Please note that the GraphQL API is
  # considered experimental: as long as this returns 0.0.0, the API is
  # subject to change without notice.
  version {
    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
  #
  # curl \
  #     -H Authorization:"Bearer <your oauth token>" \\
  #     -H Content-Type:application/json \\
  #     -d '{"query": "{ me { canonicalName } }"}' \\
  #     https://meta.sr.ht/query
}