Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Latest commit

 

History

History
23 lines (15 loc) · 810 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 810 Bytes

Kamp.us GraphQL

Example Queries

Pano Post Queries

Get all posts

curl -X POST -H 'Content-Type: application/json' -d '{"query": "{ posts() { ID, title, url, content, slug } }"}' localhost:8000/graphql

Get single post

curl -X POST -H 'Content-Type: application/json' -d '{"query": "{ post(input: { slug: \"post-slug-string\", id: \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\" }) { ID, title, url, content, slug } }"}' localhost:8000/graphql

Pano Post Mutation Query

curl -X POST -H 'Content-Type: application/json' -d '{"query": "mutation { createPost(input: { title: \"Kamp.us Pano\", url: \"https://kamp.us/pano\", content: \"hackernews clone\", userID: \"0000\" }) { ID, title, url, content, slug } }"}' localhost:8000/graphql