Improved API view

This commit is contained in:
Eduard Urbach 2018-04-08 18:10:39 +02:00
parent f05be0f71c
commit 8485e99172
2 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,6 @@
package main package main
import ( import (
"fmt"
"log" "log"
"net/http" "net/http"
"reflect" "reflect"
@ -24,7 +23,6 @@ func init() {
// Bind name for the closure // Bind name for the closure
typeName := name typeName := name
fmt.Println(typeName)
rootQueryFields[typeName] = &graphql.Field{ rootQueryFields[typeName] = &graphql.Field{
Args: graphql.FieldConfigArgument{ Args: graphql.FieldConfigArgument{
"id": &graphql.ArgumentConfig{ "id": &graphql.ArgumentConfig{

View File

@ -1,7 +1,17 @@
component API(types []string) component API(types []string)
.api-docs-page .api-docs-page
h1 API h1 API
h2 Endpoints
ul
li
strong REST:
span https://notify.moe/api
li
strong GraphQL:
span https://notify.moe/graphql
h2 Types
table table
//- thead //- thead
//- tr //- tr