Documentation ¶
Index ¶
Constants ¶
View Source
const ( FieldQuery string = "query" FieldMutation string = "mutation" )
Variables ¶
View Source
var BookmarkType = graphql.NewObject(graphql.ObjectConfig{ Name: "Bookmark", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.String, Description: "Bookmark ID (UUID)", }, "url": &graphql.Field{ Type: graphql.String, Description: "Bookmark URL", }, "description": &graphql.Field{ Type: graphql.String, Description: "A short description of the bookmark", }, "owner": &graphql.Field{ Type: UserType, Description: "Details of the user who created the bookmark", }, "visibility": &graphql.Field{ Type: graphql.String, Description: "Visibility of the bookmark (public, private or group)", }, "created_at": &graphql.Field{ Type: graphql.DateTime, Description: "The timestamp the bookmark was created at", }, }, })
View Source
var GroupType = graphql.NewObject(graphql.ObjectConfig{ Name: "Group", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.String, Description: "Group ID (UUID)", }, "name": &graphql.Field{ Type: graphql.String, Description: "The group's name", }, "url": &graphql.Field{ Type: graphql.String, Description: "The group's URL slug", }, "created_at": &graphql.Field{ Type: graphql.DateTime, Description: "The timestamp the group was created at", }, }, })
TODO implement groups
View Source
var RoleType = graphql.NewObject(graphql.ObjectConfig{ Name: "Role", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.String, Description: "Role ID (UUID)", }, "name": &graphql.Field{ Type: graphql.String, Description: "The role's name", }, "description": &graphql.Field{ Type: graphql.String, Description: "A short description of the role", }, }, })
TODO implement roles and RBA
View Source
var RootSchema graphql.Schema
View Source
var TokenType = graphql.NewObject(graphql.ObjectConfig{ Name: "Token", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.ID, Description: "Token ID (UUID)", }, }, })
View Source
var UserType = graphql.NewObject(graphql.ObjectConfig{ Name: "User", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.ID, Description: "User ID (UUID)", }, "username": &graphql.Field{ Type: graphql.String, Description: "The user's publicly visible name", }, "email": &graphql.Field{ Type: graphql.String, Description: "The user's email address", }, "password": &graphql.Field{ Type: graphql.String, Description: "The password the user picked", }, "created_at": &graphql.Field{ Type: graphql.DateTime, Description: "The timestamp the user was created at", }, "updated_at": &graphql.Field{ Type: graphql.DateTime, Description: "The timestamp the user was updated at", }, }, })
Functions ¶
This section is empty.
Types ¶
type ContextAuth ¶
type ContextAuth string
Click to show internal directories.
Click to hide internal directories.