REPL.IT QUERY
In this repl.it API, I plan to take advantage of everything. Adapted from replya.
Quickstart
const replit = ;await replit;...
Documentation
Each of these examples will require an instance of the client.
const client = ;
Query
This is the root of basically all applications. PARAMS query: This is what will be your query. It will be implemented like this:
{
query
}
You may want to read up on graphQL. RETURN A return value will look something like
query
await clientkarma;
userByUsername
await clienttalkkarma;
userById
await clienttalkkarma;
leaderboard
await clienttalk0karma; // top 5, the first person's karma
commentById
await clienttalktitle;
posts
await clienttalk0title; // newest post's title
login
await client;/*=> { username: ..., email: ..., ... auth_jwt: ...}*/
Errors
They will be in the following form.
replit query error: ...
Note that errors are put within a .catch()
block.
Credits
Special thanks to m3l0f1 to which this is adapted from replya