Created graphql (markdown)

master
Hunter Long 2019-04-03 07:32:10 -07:00
parent f1f4921b49
commit 658cd59b6c
1 changed files with 35 additions and 0 deletions

35
graphql.md Normal file

@ -0,0 +1,35 @@
Statping implements the [GraphQL](https://graphql.org/) API interface so you can customize the exact data you need within a query. The GraphQL endpoint is at `/graphql` on your Statping instance and is only available for Authenticated users or while sending the `Authorization` API Secret.
<p align="center">
<a href="https://github.com/hunterlong/statping/blob/master/handlers/graphql/schema.graphql">View schema.graphql</a>
</p>
***
### Example Queries
Retrieve the `id`, `name`, and `public` parameters from `service` #2.
###### GraphQL Query:
```graphql
{
service(id: 2) {
id
name
public
}
}
```
###### Response:
```json
{
"data": {
"service": {
"id": 2,
"name": "Statping Github",
"public": true
}
}
}
```
***