We have built a super simple, easy to user, GraphQl API playground for you to test and make your own app with our API. API is available at https://codehouse-graphql-api.herokuapp.com/
Here is how you can use Graphql with fetch
, feel free to use any of your types, axios, jquery etc.
fetch("https://codehouse-graphql-api.herokuapp.com/", {
method: "POST",
body: JSON.stringify({query: "{
cheatsheets(sort: popular){
cheatsheet_name
website_url
}
}"}),
}).then((response)=> {
console.log(response.data)
}).catch((error)=> {
error.message
})
Here are some examples for you to get started ✌️
- Get Top Cheatsheets
- Get Latest Cheatsheets
- Get All Categories
- Get All Cheatsheets of a Category
- Get All Sources
- Get All Cheatsheets from a Source
- Get All Cheatsheets on Review
- Get Contents of a particular Cheatsheet
- Get All Contributors
- Get All Feature Requests
{
cheatsheets(sort: popular){
cheatsheet_name
website_url
}
}
{
cheatsheets(sort: newest){
cheatsheet_name
website_url
}
}
{
categories{
id
name
}
}
{
category(name: "html"){
cheatsheet_name
website_url
}
}
{
sources{
hostname
cheatsheets_count
}
}
{
source(from: "medium.com"){
cheatsheet_name
upvotes
}
}
{
review{
cheatsheet_name
website_url
}
}
{
cheatsheet(id: "63971e87ed4f4deb89e7777d2b3a6862") {
cheatsheet_name
description
cover_image
}
}
{
contributors {
displayName
email
photoURL
}
}
{
featureRequests {
title
description
upvotes
}
}