pull down to refresh

How do I access the API reference again? I went to https://stacker.news/api/graphql and got
{"errors":[{"message":"This operation has been blocked as a potential Cross-Site Request Forgery (CSRF). Please either specify a 'content-type' header (with a type that is not one of application/x-www-form-urlencoded, multipart/form-data, text/plain) or provide a non-empty value for one of the following headers: x-apollo-operation-name, apollo-require-preflight\n","extensions":{"code":"BAD_REQUEST"}}]}
I don't think it had this behavior before
30 sats \ 0 replies \ @ek 6 Sep
Yeah, as @k00b mentioned, we had to take it down, sorry for this
You can find all GraphQL type definitions here.
You can make a request with curl like this:
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"query": "query($id: ID!) { item(id: $id) { id title } }", "variables": { "id": 1 } }' \
  https://stacker.news/api/graphql
Hope this helps!
reply
30 sats \ 0 replies \ @k00b 6 Sep
We had to turn off the playground sadly due to a bug in the library. The best reference atm is the source code
reply