Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JSON = graphql.NewScalar( graphql.ScalarConfig{ Name: "JSON", Description: "The `JSON` scalar type represents JSON values", Serialize: func(value interface{}) interface{} { return value }, ParseValue: func(value interface{}) interface{} { return value }, ParseLiteral: parseLiteral, }, )
JSON json type
View Source
var StatsType = graphql.NewObject(graphql.ObjectConfig{ Name: "Stats", Description: "Server statistics", Fields: graphql.Fields{ "totalWebSocketConnection": &graphql.Field{ Type: graphql.Int, Description: "Total Active Web Socket Connection", }, }, })
View Source
var TokenPayloadType = graphql.NewObject(graphql.ObjectConfig{ Name: "TokenPayload", Description: "JSON Web Token Payload", Fields: graphql.Fields{ "isValid": &graphql.Field{ Type: graphql.NewNonNull(graphql.Boolean), Description: "Is JSON Web Token valid", }, "payload": &graphql.Field{ Type: JSON, Description: "JSON Web Token key value pair", }, }, })
View Source
var TokenType = graphql.NewObject(graphql.ObjectConfig{ Name: "Token", Description: "JSON Web Token", Fields: graphql.Fields{ "token": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "JWT encoded string", }, }, })
Functions ¶
This section is empty.
Types ¶
type ErrorType ¶
type ErrorType struct { Messages []interface{} `json:"messages"` MessageType string `json:"type"` Group int `json:"group"` Code int `json:"code"` TraceID string `json:"trace_id"` }
func NewErrorType ¶
func NewErrorType() *ErrorType
func (*ErrorType) AddMessage ¶
func (e *ErrorType) AddMessage(message interface{})
func (*ErrorType) AddStringMessage ¶
type TokenPayload ¶
Click to show internal directories.
Click to hide internal directories.