api example
Coder100 (1305)

Hi everyone, so I asked a question on AMA and here is where I am now.


To learn graphQL, go here and maybe you want to search up graphQL tutorial as well on google if you are not familiar with the querying language (it's like JSON but less strict and better)

Ok, now you want to go to the headers tab, and type in this:

  "X-Requested-With": "coder100",

X-requested-with can be anything and referrer IDK about.
Now it's time to do some query-ing!

Query the heck out of there

Now, in the editor, let's get all the information about you

# Write your query or mutation here
  userByUsername(username: "[username]") {
    karma, id, firstName, lastName, bio, isVerified

Interestingly, cycles are called karma like on coins? lol


Now, make a bash file on and copy the CURL code (located in the top right) and paste it in the REPL and click run. Ugly compressed JSON code should be seen (if not an error), and this is where you have to do some things. Where you see the username: "[username]" part, escape it out so it looks like username: \"[username]\". Ok, now go to your favorite JSON beautifier and look at the fruit of your labor.


A REPL of mine is put on this tutorial to show you how awesome graphQL is!


Try to do this in node.js it won't be hard as all the headers necessary are there!

You are viewing a single comment. View All
AdCharity (1110)

how do you fetch it with javascript? I assume you use ajax or simply fetch?

Coder100 (1305)

yeah, node-fetch with the appropriate headers. example @AdCharity

Coder100 (1305)

Try not to use my sensitive info but ok @AdCharity

Coder100 (1305)

nvm i commented it out @AdCharity