Skip to content
Sign upLog in
← Back to Community

Repl.it Talk GraphQL/API Template

Profile icon
RayhanADevHacker

NodeJS GraphQL Template

By: RayhanADev

This is a simple NodeJS Template to use Repl.it's API/GraphQL to get information about a user!

How to Use

Everything is already set up! Simply replace the [username] field when you call the getData function!

Example:

getData('RayhanADev');

Output:

{ karma: 653, firstName: 'Rayhan', lastName: 'Arayilakath', bio: 'G’day, name’s Ray and since you came by check out http://bitly/ReplitUserSearch!', isVerified: true, timeCreated: '2020-09-09T12:47:49.218Z', isLoggedIn: false, organization: { name: 'Furret Developer' }, subscription: { planId: 'hacker2' }, roles: [ { name: 'self learner' }, { name: 'explorer' } ] }

Pro Tip: Want to learn how to query GraphQL and make your own project? Learn from my tutorial!

Voters
Profile icon
novance9
Profile icon
ANDREWVOSS
Profile icon
G0RG3
Profile icon
Squirrel777
Profile icon
LAMAQDAHODWALA
Profile icon
chillcafe
Profile icon
programmeruser
Profile icon
badst
Profile icon
TheOceanFace
Profile icon
elipie
Comments
hotnewtop
Profile icon
badst

LOL can't believe it, just what I was looking for. THX!
Also: do you know a way in which i can check all a users comments or posts?

Profile icon
RayhanADev

@pepelaugh
YES! I know the one for posts, I’ll pingu you later today with a tutorial!

Profile icon
badst

@RayhanADev
ight! thx :D

Profile icon
RayhanADev

@pepelaugh
hey if you’re online I invited you to something!

Profile icon
badst

@RayhanADev
i don't see it

Profile icon
programmeruser

Add this to the headers or it won't work:

//redacted due to potential of abuse, ask me in private
Profile icon
angrydoge

I got a promise pending error

Profile icon
programmeruser

@dabombdgdzjr
that's not an error.

Profile icon
angrydoge

No, it said promise pending, then gave an error lol I probably shouldve rephrwsed that

@programmeruser

Profile icon
LAMAQDAHODWALA

Epic! Maybe release this thing to pyPI so I can get it in python?

Profile icon
RayhanADev

@LAMAQDAHODWALA
I’m making a Python version of this tutorial after I make part two for this :)! Stay tuned!

Profile icon
LAMAQDAHODWALA

:DDDDDDDDDDDDDDDDDDDDDDD

@RayhanADev

Profile icon
realTronsi

@MocaCDeveloper
wow you joined in 2017 :0

Profile icon
MocaCDeveloper

@realTronsi

Huh? Wdym??

Profile icon
RayhanADev

Haha lmao

@realTronsi
just looking at everyone’s info.

Profile icon
MocaCDeveloper

@realTronsi

BRUH WTF oof ye I did xD

Profile icon
realTronsi

@MocaCDeveloper
you're one of the oldest members on repl that are still active, I've only found SixBeeps to have joined even before you

Profile icon
realTronsi

@MocaCDeveloper
yeah lol so you joined when you were still a youngling :D

Profile icon
realTronsi

@MocaCDeveloper
also u can come back now I'm done w/ math

Profile icon
MocaCDeveloper

@realTronsi

xD I left repl for like a year back in 8th grade, then I came back JUST last year. Then I lost my last account so I had to recreate because I made a go project.
Then I lost my last account because for some reason I made a C project and it just didn't work anymore. Like the terminal would just not load AT ALL.

So ye, here I am with this account :D

Profile icon
MocaCDeveloper

@realTronsi

Yep. I joined back when I wrote JavaScript and thought I was smart :D

Profile icon
realTronsi

wait so you're actually a college student?

@MocaCDeveloper

Profile icon
RayhanADev

@MocaCDeveloper
what an interesting story xD. Can you share any og Repl stories pwease?

Profile icon
MocaCDeveloper

@realTronsi

I am in history so I might have to go so I don't want to join right away but I got the parser.h file done(for the time being) and started on the parser.c file.

Everything is working perfectly.

Profile icon
realTronsi

@MocaCDeveloper
wait nvm lol you left at 8th grade not left after one year of 8th grade

Profile icon
realTronsi

@MocaCDeveloper

Yep. I joined back when I wrote JavaScript and thought I was smart :D

I feel attacked

Profile icon
MocaCDeveloper

@realTronsi

Huh?

Profile icon
realTronsi

@MocaCDeveloper
alright sounds good.

Profile icon
MocaCDeveloper

@realTronsi

You should :)

Profile icon
realTronsi

@MocaCDeveloper
??

Profile icon
MocaCDeveloper

@realTronsi

I'm on :D

Profile icon
MocaCDeveloper

@RayhanADev

Lol I really can't remember anything from back in 2017. It is primarily the same just has different styles nowdays. A bit more languages have been added since then and the terminal has been updated quite a bit. The terminal used to be very, VERY bold and you'd just sit there and see one side being the code, one side being the crappy terminal, then that old ugly run button lol.

Profile icon
RayhanADev

@MocaCDeveloper
ooohhhh. Thanks for story uwu!

Profile icon
realTronsi

@MocaCDeveloper
baxck

Profile icon
MocaCDeveloper

@realTronsi

Lol what's the link again?

:)

Profile icon
MocaCDeveloper

@realTronsi

I’ll be back on in a minute

Profile icon
RayhanADev

@MocaCDeveloper
me thinking people care about my template, only to realize it’s you two xD

Profile icon
realTronsi

@MocaCDeveloper
epic

Profile icon
realTronsi

@RayhanADev
rips

Profile icon
realTronsi

@RayhanADev
you need to fixx your formula, it was still to high effort

Profile icon
RayhanADev

@realTronsi
lmao, obtw that post got unlisted xD.

Profile icon
realTronsi

@RayhanADev
oh lmao

Profile icon
RayhanADev

@realTronsi
cactus no like satires ;P

Profile icon
MocaCDeveloper

@realTronsi

Ay i am on my guy

Profile icon
realTronsi

@MocaCDeveloper
come on the repl

Profile icon
MicroSoftHelp

@RayhanADev
so u released the package?

Profile icon
RayhanADev

@MicroSoftHelp
yeah version 1.0.3, but you want to wait for the documentation. I’m almost done with it.

Profile icon
MicroSoftHelp

@RayhanADev
k

Profile icon
MicroSoftHelp

@RayhanADev
so after you release the documentation could u explain how the alt detector works?

Profile icon
RayhanADev

@MicroSoftHelp
that’s a secret, no..
but you can try and make one I give more than enough resources in the package!

also I’ll post in share when I finish documentation, so don’t worry!

Profile icon
MicroSoftHelp

@RayhanADev
ok, thanks!

Profile icon
realTronsi

@RayhanADev
your alt detector == flawed because you can't get upvotes from comments :p

Profile icon
MicroSoftHelp

@realTronsi
true, and
@RayhanADev
if you get a ping from me it is bc I'm working on a project don't worry bout it

it is private bc I have haxer plan now!!

Profile icon
realTronsi

@RayhanADev
also you be ignoring my comments to you earlier ;-;

anyways

@MicroSoftHelp
the alt detector most likely just checks post upvotes, sees which users are common across all the posts, and also increases alt likelyhood depending on suspected alt's cycles and activity.

Profile icon
RayhanADev

@realTronsi
that’s the big problem and Repl GraphQL is freaking dumb about comments because the queries are super redundant.

Profile icon
MicroSoftHelp

@realTronsi
ahhh, imma learn nodejs

Profile icon
realTronsi

@RayhanADev
btw since moca and xxperthacker are busy I was making a multiplayer pokemon console game to join the console game club, idk if you wanted to join since you knew a lot about pokemon and I'm bored

Profile icon
RayhanADev

@realTronsi
sure I’ll join
but what are you using?

Profile icon
realTronsi